diff options
| author | Mitsuo Tokumori <[email protected]> | 2025-03-08 16:03:30 +0900 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2025-03-08 16:03:30 +0900 |
| commit | 51163b167cce01af6101438e5e61145ad798f213 (patch) | |
| tree | 9c8e75266cedfb205db175b0b2bc41b49df75cea /app/__init__.py | |
| parent | d9af103b9a8aed86d6ac834f1240edfb2173ffa0 (diff) | |
| download | masu-51163b167cce01af6101438e5e61145ad798f213.tar.gz masu-51163b167cce01af6101438e5e61145ad798f213.tar.bz2 masu-51163b167cce01af6101438e5e61145ad798f213.zip | |
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
Diffstat (limited to 'app/__init__.py')
| -rw-r--r-- | app/__init__.py | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
