django1/tests/wsgi/urls.py

13 lines
265 B
Python
Raw Normal View History

from django.conf.urls import url
from django.http import FileResponse, HttpResponse
def helloworld(request):
return HttpResponse("Hello World!")
2016-11-13 01:11:23 +08:00
urlpatterns = [
url("^$", helloworld),
url(r'^file/$', lambda x: FileResponse(open(__file__, 'rb'))),
]