Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config flag for SQLAlchemy vs. Flask-SQLAlchemy Extension #161

Open
akcode47 opened this issue Jan 1, 2022 · 0 comments
Open

Add config flag for SQLAlchemy vs. Flask-SQLAlchemy Extension #161

akcode47 opened this issue Jan 1, 2022 · 0 comments

Comments

@akcode47
Copy link

akcode47 commented Jan 1, 2022

Achieved it this way, but it would be nice if there was an option within flask-debugtoolbar to toggle the use between the two:

# https://pypi.org/project/flask-debugtoolbar-sqlalchemy/
# https://git.sr.ht/~ihabunek/flask_debugtoolbar_sqlalchemy/tree/master

# Remove the Flask-SQLAlchemy Extension specific SQLAlchemyDebugPanel and Replace with SQLAlchemyPanel

app.config['DEBUG_TB_PANELS'] = tuple(
      list(
            map(
                  lambda x: x.replace(
                        'flask_debugtoolbar.panels.sqlalchemy.SQLAlchemyDebugPanel',                                                                         
                        'flask_debugtoolbar_sqlalchemy.SQLAlchemyPanel'
                  ), 
                  list(
                        app.config['DEBUG_TB_PANELS']
                  )
            )
      )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant