fix: fix module init template for full app
This commit is contained in:
parent
0e280ea0c2
commit
c59d4b90b9
@ -3,17 +3,17 @@ def init_full_py(app_name: str, secret_key: str) -> str:
|
||||
from quart import Quart
|
||||
from quart_imp.config import QuartConfig, ImpConfig
|
||||
|
||||
from {app_name}.extensions import imp
|
||||
from {app_name}.extensions.sql import db
|
||||
from {app_name}.extensions import imp, sql
|
||||
|
||||
|
||||
def create_app():
|
||||
app = Quart(__name__, static_url_path="/")
|
||||
|
||||
QuartConfig(
|
||||
cfg = QuartConfig(
|
||||
secret_key="{secret_key}",
|
||||
app_instance=app
|
||||
)
|
||||
cfg.init_app(app)
|
||||
|
||||
imp.init_app(app, ImpConfig(
|
||||
init_session={{"logged_in": False}},
|
||||
@ -23,7 +23,7 @@ def create_app():
|
||||
imp.import_blueprints("blueprints")
|
||||
imp.import_models("models")
|
||||
|
||||
db.init_app(app)
|
||||
sql.register_module(app)
|
||||
|
||||
return app
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user