syrusakbary / Flask-SuperAdmin

The best admin interface framework for Flask. With scaffolding for MongoEngine, Django and SQLAlchemy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception: Flask-SuperAdmin is already associated with an application.

suzanshakya opened this issue · comments

It seems that flask-superadmin doesn't work with multiple Flask application instances at once. I use Application Factories pattern to create application as needed to aid unittests and to support multiple configurations.

def init_app(self, app):
    """
        Register all views with Flask application.

        `app`
            Flask application instance
    """
    if self.app is not None:
        raise Exception('Flask-SuperAdmin is already associated with an application.')

Same issue for me.

I will try to submit a PR soon.