I want to use Flask-Perm's decorators in different modules in my application. I am using the app factory pattern. If I create the extension in the factory, I can't import it to use in the other modules. How can I import an extension when using an app factory?
from flask_perm import Perm
def create_app():
app = Flask(__name__)
perm = Perm(app)
return app