log in
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
from flask import Flask
|
||||
from flask import Flask, session
|
||||
from dotenv import load_dotenv
|
||||
from .models import Avatars, Users
|
||||
from .auth import digest
|
||||
from .constants import PermissionLevel
|
||||
from .routes.users import is_logged_in, get_active_user
|
||||
from .constants import (
|
||||
PermissionLevel,
|
||||
InfoboxKind, InfoboxIcons, InfoboxHTMLClass
|
||||
)
|
||||
import os
|
||||
import time
|
||||
import secrets
|
||||
@ -64,6 +68,22 @@ def create_app():
|
||||
create_deleted_user()
|
||||
|
||||
from app.routes.app import bp as app_bp
|
||||
from app.routes.topics import bp as topics_bp
|
||||
from app.routes.users import bp as users_bp
|
||||
app.register_blueprint(app_bp)
|
||||
app.register_blueprint(topics_bp)
|
||||
app.register_blueprint(users_bp)
|
||||
|
||||
|
||||
@app.context_processor
|
||||
def inject_constants():
|
||||
return {
|
||||
"InfoboxIcons": InfoboxIcons,
|
||||
"InfoboxHTMLClass": InfoboxHTMLClass,
|
||||
}
|
||||
|
||||
@app.context_processor
|
||||
def inject_auth():
|
||||
return {"is_logged_in": is_logged_in, "get_active_user": get_active_user}
|
||||
|
||||
return app
|
||||
|
Reference in New Issue
Block a user