summaryrefslogtreecommitdiff
path: root/app/blueprints/web.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/blueprints/web.py')
-rw-r--r--app/blueprints/web.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/blueprints/web.py b/app/blueprints/web.py
new file mode 100644
index 0000000..f4e2949
--- /dev/null
+++ b/app/blueprints/web.py
@@ -0,0 +1,9 @@
+from flask import Blueprint, render_template, current_app
+from ..services import images
+
+web_controller = Blueprint('web', __name__, template_folder='templates')
+
+@web_controller.route('/')
+def main_page():
+ imgs = images.get_all_images(current_app)
+ return render_template('index.html', images=imgs) \ No newline at end of file