diff options
Diffstat (limited to 'app/blueprints')
| -rw-r--r-- | app/blueprints/__init__.py | 0 | ||||
| -rw-r--r-- | app/blueprints/web.py | 9 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/blueprints/__init__.py b/app/blueprints/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/app/blueprints/__init__.py 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 |
