Replaced `_request_ctx_stack.top` with `request_ctx` per https://github.com/pallets/flask/pull/4682
This checks the version of `flask` and only does the switcheroo on newer versions of flask...
When on small screens where the debug toolbar is longer than the screen there was no way to access the items listed at the bottom of the toolbar. Adding `overflow-y: auto` allows a scrollbar to be used when this is the case.
There are small typos in:
- src/flask_debugtoolbar/panels/profiler.py
- src/flask_debugtoolbar/static/codemirror/mode/rst/rst.js
- src/flask_debugtoolbar/static/codemirror/mode/xquery/xquery.js
- src/flask_debugtoolbar/static/js/jquery.tablesorter.js
Fixes:
- Should read `second` rather than `secound`.
- Should read `preceded` rather than `preceeded`.
- Should read `initial` rather than `inital`.
- Should read `divided` rather than `divded`.
- Should read `debugging` rather than `debuging`.
- Should read `convenience` rather than `conveinence`.
- Should read `capabilities` rather than `capabilitys`.
Change to expand what HTTP codes the toolbar displays on. Currently it only displays on 200 (or redirects when DEBUG_TB_INTERCEPT_REDIRECTS is enabled). However, debugging or verifying non-200 pages is commonly necessary. This change would enable display of the toolbar on other pages that may serve HTML, specifically: 201, 400, 401, 403, 404, 405, 500, 501, 502, 503, 504
Change to improve accessibility compliance, for example useful when a developer is using a screen reader. Using the ARIA role attribute is a HTML4 compatible way of accomplishing this.
For reference: https://dequeuniversity.com/rules/axe/4.3/region
Co-authored-by: Megan Schanz <schanzme@msu.edu>
After building this locally I noticed all of the expected files were in
the wheel where as before this patch it was missing a lot of files.
This idea of using a src/ directory is mentioned in the official Python
documentation for packaging files at:
https://packaging.python.org/en/latest/tutorials/packaging-projects/
It's also used in Flask and other large Python projects.