mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
12 lines
264 B
Python
12 lines
264 B
Python
from django.conf.urls import url
|
|
from django.http import FileResponse, HttpResponse
|
|
|
|
|
|
def helloworld(request):
|
|
return HttpResponse("Hello World!")
|
|
|
|
urlpatterns = [
|
|
url("^$", helloworld),
|
|
url(r'^file/$', lambda x: FileResponse(open(__file__, 'rb'))),
|
|
]
|