built ability to create a character
This commit is contained in:
@@ -1,15 +1,22 @@
|
||||
import os
|
||||
from flask import Flask, redirect, url_for, request, g, session, flash
|
||||
from .blueprints.auth.routes import auth_bp
|
||||
from .blueprints.main.routes import main_bp
|
||||
from .blueprints.public.routes import public_bp
|
||||
|
||||
# import blueprints
|
||||
from app.blueprints.auth import auth_bp
|
||||
from app.blueprints.main import main_bp
|
||||
from app.blueprints.char import char_bp
|
||||
from app.blueprints.public import public_bp
|
||||
from app.blueprints.ajax import ajax_bp
|
||||
|
||||
# load_dotenv()
|
||||
from .utils.settings import get_settings
|
||||
from app.utils.logging import get_logger
|
||||
from .utils.session_user import SessionUser
|
||||
|
||||
logger = get_logger()
|
||||
settings = get_settings()
|
||||
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__, template_folder="templates")
|
||||
app.config.update(
|
||||
@@ -25,7 +32,9 @@ def create_app():
|
||||
# Blueprints
|
||||
app.register_blueprint(auth_bp)
|
||||
app.register_blueprint(main_bp)
|
||||
app.register_blueprint(char_bp)
|
||||
app.register_blueprint(public_bp)
|
||||
app.register_blueprint(ajax_bp)
|
||||
|
||||
@app.before_request
|
||||
def require_login():
|
||||
@@ -68,7 +77,6 @@ def create_app():
|
||||
@app.before_request
|
||||
def load_user():
|
||||
user_data = session.get("user")
|
||||
print(user_data)
|
||||
|
||||
if user_data:
|
||||
g.current_user = SessionUser(
|
||||
|
||||
Reference in New Issue
Block a user