add views
This commit is contained in:
parent
0cd4b178fd
commit
314229286d
@ -9,6 +9,7 @@ from healthcheck import HealthCheck
|
|||||||
from utils.config import SENTRY_DSN, RELEASE_ID, RELEASEMODE, POSTGRES_DB, PORT, POSTGRES_HOSTNAME, POSTGRES_PASSWORD, \
|
from utils.config import SENTRY_DSN, RELEASE_ID, RELEASEMODE, POSTGRES_DB, PORT, POSTGRES_HOSTNAME, POSTGRES_PASSWORD, \
|
||||||
POSTGRES_USERNAME, DEBUG, SECRET_KEY
|
POSTGRES_USERNAME, DEBUG, SECRET_KEY
|
||||||
from utils import db, ma, health_database_status, security, user_datastore
|
from utils import db, ma, health_database_status, security, user_datastore
|
||||||
|
from views import ItemView, LoginView, ProfileView, RegisterView, UploadView
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Main Flask entrypoint
|
Main Flask entrypoint
|
||||||
@ -52,7 +53,8 @@ logger = logging.getLogger(__name__)
|
|||||||
logger.setLevel(logging.DEBUG)
|
logger.setLevel(logging.DEBUG)
|
||||||
logger.addHandler(handler)
|
logger.addHandler(handler)
|
||||||
|
|
||||||
# api.add_resource(SampleResource, "/sample")
|
for view in [ItemView, LoginView, ProfileView, RegisterView, UploadView]:
|
||||||
|
view.register(app, trailing_slash=False)
|
||||||
|
|
||||||
health.add_check(health_database_status)
|
health.add_check(health_database_status)
|
||||||
app.add_url_rule("/healthz", "healthcheck", view_func=lambda: health.run())
|
app.add_url_rule("/healthz", "healthcheck", view_func=lambda: health.run())
|
||||||
|
5
src/views/__init__.py
Normal file
5
src/views/__init__.py
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
from .loginview import LoginView
|
||||||
|
from .profileview import ProfileView
|
||||||
|
from .registerview import RegisterView
|
||||||
|
from .uploadview import UploadView
|
||||||
|
from .itemview import ItemView
|
18
src/views/itemview.py
Normal file
18
src/views/itemview.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from flask_classful import FlaskView
|
||||||
|
|
||||||
|
"""
|
||||||
|
Item VIEW
|
||||||
|
"""
|
||||||
|
|
||||||
|
__author__ = "@tormakris"
|
||||||
|
__copyright__ = "Copyright 2020, UnstableVortex Team"
|
||||||
|
__module_name__ = "itemview"
|
||||||
|
__version__text__ = "1"
|
||||||
|
|
||||||
|
|
||||||
|
class ItemView(FlaskView):
|
||||||
|
|
||||||
|
def index(self):
|
||||||
|
pass
|
18
src/views/loginview.py
Normal file
18
src/views/loginview.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from flask_classful import FlaskView
|
||||||
|
|
||||||
|
"""
|
||||||
|
Login VIEW
|
||||||
|
"""
|
||||||
|
|
||||||
|
__author__ = "@tormakris"
|
||||||
|
__copyright__ = "Copyright 2020, UnstableVortex Team"
|
||||||
|
__module_name__ = "loginview"
|
||||||
|
__version__text__ = "1"
|
||||||
|
|
||||||
|
|
||||||
|
class LoginView(FlaskView):
|
||||||
|
|
||||||
|
def index(self):
|
||||||
|
pass
|
18
src/views/profileview.py
Normal file
18
src/views/profileview.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from flask_classful import FlaskView
|
||||||
|
|
||||||
|
"""
|
||||||
|
Profile VIEW
|
||||||
|
"""
|
||||||
|
|
||||||
|
__author__ = "@tormakris"
|
||||||
|
__copyright__ = "Copyright 2020, UnstableVortex Team"
|
||||||
|
__module_name__ = "profileview"
|
||||||
|
__version__text__ = "1"
|
||||||
|
|
||||||
|
|
||||||
|
class ProfileView(FlaskView):
|
||||||
|
|
||||||
|
def index(self):
|
||||||
|
pass
|
18
src/views/registerview.py
Normal file
18
src/views/registerview.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from flask_classful import FlaskView
|
||||||
|
|
||||||
|
"""
|
||||||
|
Register VIEW
|
||||||
|
"""
|
||||||
|
|
||||||
|
__author__ = "@tormakris"
|
||||||
|
__copyright__ = "Copyright 2020, UnstableVortex Team"
|
||||||
|
__module_name__ = "registerview"
|
||||||
|
__version__text__ = "1"
|
||||||
|
|
||||||
|
|
||||||
|
class RegisterView(FlaskView):
|
||||||
|
|
||||||
|
def index(self):
|
||||||
|
pass
|
18
src/views/uploadview.py
Normal file
18
src/views/uploadview.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from flask_classful import FlaskView
|
||||||
|
|
||||||
|
"""
|
||||||
|
Upload VIEW
|
||||||
|
"""
|
||||||
|
|
||||||
|
__author__ = "@tormakris"
|
||||||
|
__copyright__ = "Copyright 2020, UnstableVortex Team"
|
||||||
|
__module_name__ = "uploadview"
|
||||||
|
__version__text__ = "1"
|
||||||
|
|
||||||
|
|
||||||
|
class UploadView(FlaskView):
|
||||||
|
|
||||||
|
def index(self):
|
||||||
|
pass
|
Loading…
Reference in New Issue
Block a user