Imported Response (#8207)

This commit is contained in:
Uzair Ali 2021-10-07 20:22:44 +05:30 committed by GitHub
parent 53a0585dac
commit ddc5cd7e4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):