diff options
author | BonfaceKilz | 2021-02-16 19:13:40 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-02-16 19:13:40 +0300 |
commit | 8fe418159306c1d04e4a13a63a7cd2b5b52dd5d5 (patch) | |
tree | 0b585a49d5599ae0130416a2ec762d9bb58da512 | |
parent | e2b150f89d58133c7ba3d769d66127a2ff037d92 (diff) | |
download | genenetwork3-8fe418159306c1d04e4a13a63a7cd2b5b52dd5d5.tar.gz |
Register blueprints in gn3/app.py
* main.py: Move blueprint registrations to ...
* gn3/app.py (create_app): ... here
-rw-r--r-- | gn3/app.py | 2 | ||||
-rw-r--r-- | main.py | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -5,6 +5,7 @@ from typing import Dict from typing import Union from flask import Flask +from gn3.api.gemma import gemma def create_app(config: Union[Dict, str, None] = None) -> Flask: """Create a new flask object""" @@ -22,4 +23,5 @@ def create_app(config: Union[Dict, str, None] = None) -> Flask: app.config.update(config) elif config.endswith(".py"): app.config.from_pyfile(config) + app.register_blueprint(gemma, url_prefix="/gemma") return app @@ -1,9 +1,7 @@ """Main entry point for project""" from gn3.app import create_app -from gn3.api.gemma import gemma app = create_app() -app.register_blueprint(gemma, url_prefix="/gemma") app.run(host="0.0.0.0") |