refactor security to Flask-Security - Part 2

This commit is contained in:
Josako
2024-04-26 16:23:17 +02:00
parent a37b551e53
commit 9c1a3e8f55
22 changed files with 173 additions and 299 deletions

View File

@@ -1,3 +1,4 @@
import logging
import os
from flask import Flask
from flask_security import SQLAlchemyUserDatastore
@@ -29,7 +30,9 @@ def create_app(config_file=None):
register_blueprints(app)
print(app.config.get('SQLALCHEMY_DATABASE_URI'))
if app.config['DEBUG'] is True:
app.logger.setLevel(logging.DEBUG)
return app
@@ -45,8 +48,6 @@ def register_extensions(app):
def register_blueprints(app):
from .views.user_views import user_bp
app.register_blueprint(user_bp)
from .views.auth_views import auth_bp
app.register_blueprint(auth_bp)
def register_api(app):