mirror of
https://github.com/lemeow125/Notes.git
synced 2024-11-17 04:09:26 +08:00
vault backup: 2024-11-02 18:28:18
Affected files: docs/Guides/Django REST Framework/7 - Writing API Endpoints.md
This commit is contained in:
parent
e7707a3982
commit
c5827afeef
1 changed files with 2 additions and 2 deletions
|
@ -85,6 +85,6 @@ If serializers convert the underlying model to JSON, then views return the web r
|
||||||
![](_resources/7%20-%20Writing%20API%20Endpoints/9bb3d5c0c6da24a9d80d81d1e5b4a716_MD5.jpeg)
|
![](_resources/7%20-%20Writing%20API%20Endpoints/9bb3d5c0c6da24a9d80d81d1e5b4a716_MD5.jpeg)
|
||||||
Views take in HTTP requests passed in from the actual URL. You can specify a `queryset` to define what objects to return and specify a serializer which will be used to structure the returned data.
|
Views take in HTTP requests passed in from the actual URL. You can specify a `queryset` to define what objects to return and specify a serializer which will be used to structure the returned data.
|
||||||
|
|
||||||
Much like with DRF serializers, you can use permissions to change what's returned to the user.
|
Much like with DRF serializers, you customize what they return to the user.
|
||||||
![](_resources/7%20-%20Writing%20API%20Endpoints/695f930d4993ff8d8f2ccf806bd9ca9f_MD5.jpeg)
|
![](_resources/7%20-%20Writing%20API%20Endpoints/695f930d4993ff8d8f2ccf806bd9ca9f_MD5.jpeg)
|
||||||
If you're implementing caching like Redis or Memcached, this is usually where you'll integrate it
|
If you're using Memcached or Redis, you'll most likely have
|
Loading…
Reference in a new issue