pallets-eco / flask-debugtoolbar

A toolbar overlay for debugging Flask applications
https://flask-debugtoolbar.readthedocs.io
BSD 3-Clause "New" or "Revised" License
953 stars 146 forks source link

Fix SQLAlchemy SELECT/EXPLAIN to use url_for to respect app prefixes.… #143

Closed mattaw closed 4 years ago

mattaw commented 4 years ago

… Provide url_for to all toolbar templates. In my situation the Flask app is running with a URL prefix, but the old SELECT/EXPLAIN links were hardcoded, so did not work.

Fixed by injecting url_for from flask into jinja globals to be available in all templates and use it in sqlalchemy.html template to fix the issue.