basic temapltes rendered
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
from .loginview import LoginView
|
||||
from .profileview import ProfileView
|
||||
from .registerview import RegisterView
|
||||
from .uploadview import UploadView
|
||||
from .itemview import ItemView
|
||||
from .indexview import IndexView
|
||||
|
||||
23
src/views/indexview.py
Normal file
23
src/views/indexview.py
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env python3
|
||||
from flask import render_template
|
||||
from flask_classful import FlaskView
|
||||
|
||||
from models import Item
|
||||
|
||||
"""
|
||||
Index VIEW
|
||||
"""
|
||||
|
||||
__author__ = "@tormakris"
|
||||
__copyright__ = "Copyright 2020, UnstableVortex Team"
|
||||
__module_name__ = "indexview"
|
||||
__version__text__ = "1"
|
||||
|
||||
|
||||
class IndexView(FlaskView):
|
||||
|
||||
route_base = '/'
|
||||
|
||||
def index(self):
|
||||
items = Item.query.all()
|
||||
return render_template("index.html", images=items)
|
||||
@@ -14,5 +14,14 @@ __version__text__ = "1"
|
||||
|
||||
class ItemView(FlaskView):
|
||||
|
||||
route_prefix = "/item/"
|
||||
route_base = '/'
|
||||
|
||||
def index(self):
|
||||
pass
|
||||
|
||||
def download(self):
|
||||
pass
|
||||
|
||||
def delete(self):
|
||||
pass
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/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
|
||||
@@ -14,5 +14,8 @@ __version__text__ = "1"
|
||||
|
||||
class ProfileView(FlaskView):
|
||||
|
||||
route_prefix = "/profile/"
|
||||
route_base = '/'
|
||||
|
||||
def index(self):
|
||||
pass
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/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
|
||||
@@ -14,5 +14,8 @@ __version__text__ = "1"
|
||||
|
||||
class UploadView(FlaskView):
|
||||
|
||||
route_prefix = "/upload/"
|
||||
route_base = '/'
|
||||
|
||||
def index(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user