From 51163b167cce01af6101438e5e61145ad798f213 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Sat, 8 Mar 2025 16:03:30 +0900 Subject: Restructure python code to be modular The python code is now a package named app. app/models: db models app/routes: flask blueprints app/static: css, js app/templates: jinja html templates --- app/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 app/__init__.py (limited to 'app/__init__.py') diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..4bf2b5a --- /dev/null +++ b/app/__init__.py @@ -0,0 +1,8 @@ +from flask import Flask +from .routes import main + +def create_app(): + app = Flask(__name__) + app.config.from_pyfile('config.py') + app.register_blueprint(routes.main.bp) + return app -- cgit v1.2.3