MCPcopy
hub / github.com/django/django / __acall__

Method __acall__

django/utils/deprecation.py:393–410  ·  view source on GitHub ↗

Async version of __call__ that is swapped in when an async request is running.

(self, request)

Source from the content-addressed store, hash-verified

391 return response
392
393 async def __acall__(self, request):
394 """
395 Async version of __call__ that is swapped in when an async request
396 is running.
397 """
398 response = None
399 if hasattr(self, "process_request"):
400 response = await sync_to_async(
401 self.process_request,
402 thread_sensitive=True,
403 )(request)
404 response = response or await self.get_response(request)
405 if hasattr(self, "process_response"):
406 response = await sync_to_async(
407 self.process_response,
408 thread_sensitive=True,
409 )(request, response)
410 return response

Callers 1

__call__Method · 0.95

Calls 1

get_responseMethod · 0.45

Tested by

no test coverage detected