21 lines
605 B
Python
21 lines
605 B
Python
from flask import Flask
|
|
from flask_session import Session
|
|
from core.blueprints.utils import logged_in_user
|
|
|
|
def create_app():
|
|
app = Flask(__name__, template_folder="../../ui/templates/")
|
|
app.config["SECRET_KEY"] = ""
|
|
app.config["SESSION_PERMANENT"] = False
|
|
app.config["SESSION_TYPE"] = "filesystem"
|
|
|
|
Session(app)
|
|
app.before_request(logged_in_user)
|
|
|
|
with app.app_context():
|
|
from core.blueprints.authentication import auth_bp
|
|
from core.blueprints.main import main_bp
|
|
|
|
app.register_blueprint(auth_bp)
|
|
app.register_blueprint(main_bp)
|
|
|
|
return app |