from flask import Flask
from flask_login import LoginManager
from config import config

database = {}
login_manager = LoginManager()

def create_app(config_name):
    app = Flask(__name__)
    app.database = database
    app.config.from_object(config[config_name])
    login_manager.init_app(app)

    @login_manager.user_loader
    def load_user(username):
        for user in app.database:
            if user.username == username:
                return user

    from . import views
    app.register_blueprint(views.views)
    return app

@@ -100,16 +100,35 @@
 e = %7B%7D%0D%0A
+current_user = %7B%7D%0D%0A
 login_ma
@@ -239,16 +239,53 @@
 tabase%0D%0A
+    app.current_user = current_user%0D%0A
     app.

Add current_user to app properties