blob: 57e1ebf01cb89a969573cd27f24aa0804b82c1b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
from django.http import FileResponse, HttpResponse
from django.urls import path
def helloworld(request):
return HttpResponse("Hello World!")
urlpatterns = [
path('', helloworld),
path('file/', lambda x: FileResponse(open(__file__, 'rb'))),
]
|