blob: b924adea41aec992dcbb93509821a4bd68507fe8 (
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"))),
]
|