Open salty-ivy opened 1 week ago
LGTM. I wonder how the panels can differentiate in
process_request
between the sync and async version.
panels would receive either WSGIRequest
or ASGIRequest
( not async ) instance which are subclasses of HttpRequest
.
Also, awaiting def process_request (NOT async def process_request) looks a bit strange, but seems fine to me after thinking about it a bit.
process_request
call of panels would ultimately reach down to view via chain of calls of both panels and then middlewares, the response will always be adapted to async by adapt_method_mode
that has to be awaited.
it even adapts the view if its not async def
the response will be adapted to async coroutines if the receiving middleware is async
and we are running in async context ( if both conditions are true ).
this is my overall understanding so far.
Description
GSoC 2024
This PR aims to add async compatibility in django-debug-toolbar middleware
Fixes # (issue)
Checklist:
docs/changes.rst
.