mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 01:47:59 +03:00 
			
		
		
		
	Imported Response (#8207)
This commit is contained in:
		
							parent
							
								
									53a0585dac
								
							
						
					
					
						commit
						ddc5cd7e4b
					
				| 
						 | 
				
			
			@ -145,6 +145,7 @@ REST framework also allows you to work with regular function based views.  It pr
 | 
			
		|||
The core of this functionality is the `api_view` decorator, which takes a list of HTTP methods that your view should respond to. For example, this is how you would write a very simple view that just manually returns some data:
 | 
			
		||||
 | 
			
		||||
    from rest_framework.decorators import api_view
 | 
			
		||||
    from rest_framework.response import Response
 | 
			
		||||
 | 
			
		||||
    @api_view()
 | 
			
		||||
    def hello_world(request):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user