Closed
Description
Description
The Debug Toolbar history pannel is very useful for AJAZ json requests. Unfortunately, it doesn't work for non-ajax, non-json requests - for example, a "Download data" button that downloads an Excel file generated on the fly. It would be great to tweak that, potentially through a configuration option.
Example implementation
- Add a configuration option
CAPTURED_CONTENT_TYPES
, defaults to["application/json"]
- Can be extended in the settings
- In
middleware.py
:
if request.is_ajax() or content_type in self.config["CAPTURED_CONTENT_TYPES"]:
toolbar.render_toolbar()
Metadata
Metadata
Assignees
Labels
No labels