mirror of
				https://github.com/django/django.git
				synced 2025-11-04 13:39:16 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			258 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			258 B
		
	
	
	
		
			Python
		
	
	
	
	
	
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'))),
 | 
						|
]
 |