From ff1957bec98773c9e59293c29f8ed59881f3cf2e Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Sat, 12 Mar 2022 22:22:49 +0100 Subject: [PATCH] app blueprints --- .gitignore | 3 ++- postit/app.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d9011c2..891315c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ dist/ build/ *.egg-info/ -.env \ No newline at end of file +.env +.vscode \ No newline at end of file diff --git a/postit/app.py b/postit/app.py index e056e48..3c6552e 100644 --- a/postit/app.py +++ b/postit/app.py @@ -31,6 +31,16 @@ def create_app(test_config=None): mimetype="image/vnd.microsoft.icon", ) + from . import home + + app.register_blueprint(home.bp) + + from . import contents + + app.register_blueprint(contents.bp) + app.wsgi_app = prefix.PrefixMiddleware( app.wsgi_app, prefix=os.environ.get("URL_PREFIX", "") ) + + return app