mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #31224 -- Added support for asynchronous views and middleware.
This implements support for asynchronous views, asynchronous tests, asynchronous middleware, and an asynchronous test client.
This commit is contained in:
committed by
Mariusz Felisiak
parent
3f7e4b16bf
commit
fc0fa72ff4
@@ -27,3 +27,11 @@ def exception_in_render(request):
|
||||
raise Exception('Exception in HttpResponse.render()')
|
||||
|
||||
return CustomHttpResponse('Error')
|
||||
|
||||
|
||||
async def async_exception_in_render(request):
|
||||
class CustomHttpResponse(HttpResponse):
|
||||
async def render(self):
|
||||
raise Exception('Exception in HttpResponse.render()')
|
||||
|
||||
return CustomHttpResponse('Error')
|
||||
|
||||
Reference in New Issue
Block a user