refactor security to Flask-Security - Part 2
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user