add basic functionality

This commit is contained in:
Wolfang Torres
2026-06-06 22:12:47 +08:00
parent 64380d2942
commit 345c1a8065
9 changed files with 189 additions and 90 deletions

View File

@@ -4,17 +4,19 @@ from pathlib import Path
# Pip
from flask import Flask
# Local
from .homescreen import homescreen
from .mainapp import mainapp
def create_app(test_config=None):
# create and configure the app
app = Flask(__name__, instance_relative_config=True)
# ensure the instance folder exists
instance_path = Path(app.instance_path)
instance_path.mkdir(parents=True, exist_ok=True)
# configs
app.config.from_mapping(
SECRET_KEY="dev",
@@ -28,7 +30,7 @@ def create_app(test_config=None):
# load the test config if passed in
app.config.from_mapping(test_config)
for blueprint in (homescreen,):
for blueprint in (homescreen, mainapp):
app.register_blueprint(blueprint)
return app