add basic functionality
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user