django/tests/asgi/urls.py
Andrew Godwin a415ce70be Fixed #30451 -- Added ASGI handler and coroutine-safety.
This adds an ASGI handler, asgi.py file for the default project layout,
a few async utilities and adds async-safety to many parts of Django.
2019-06-20 12:29:43 +02:00

16 lines
290 B
Python

from django.http import FileResponse, HttpResponse
from django.urls import path
def helloworld(request):
return HttpResponse('Hello World!')
test_filename = __file__
urlpatterns = [
path('', helloworld),
path('file/', lambda x: FileResponse(open(test_filename, 'rb'))),
]