pallets-eco / pallets-eco/flask-debugtoolbar
Add config flag for SQLAlchemy vs. Flask-SQLAlchemy Extension
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 978
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
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']
)
)
)
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading how DEBUG_TB_PANELS currently selects flask_debugtoolbar.panels.sqlalchemy.SQLAlchemyDebugPanel and compare it with flask_debugtoolbar_sqlalchemy.SQLAlchemyPanel. Done means users can configure a flag to choose either integration without manually rewriting the panel list, with the existing behavior preserved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python, sqlalchemy
- Domain
- backend, databases, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100