Middleware
Json Debug Toolbar Middleware
This module includes functions that extend the functionality of the Django Debug Toolbar to non HTML responses.
- class integreat_cms.api.middleware.json_debug_toolbar_middleware.JsonDebugToolbarMiddleware(get_response: Callable | AsyncToSync)[source]
Bases:
object
The Django Debug Toolbar usually only works for views that return HTML. This middleware wraps any JSON response in HTML if the request has a ‘debug’ query parameter (e.g. http://localhost:8000/api/v3/augsburg/de/pages?debug)
- Parameters:
get_response (Callable | AsyncToSync)