flask-security: how to use in blueprint/extension app pattern?
Below is what I have.
extensions.py
from flask_sqlalchemy import SQLAlchemyfrom flask_security import Securitydb = SQLAlchemy()security = Security()
__init__.py
from .extensions import db, securityfrom .models import User, Roledef create_app(config_name): user_datastore = SQLAlchemyUserDatastore(db, User, Role) security.init_app(app, user_datastore)