What You Should Know About Django REST Framework
summary
Covers concrete, usable DRF mechanics: how ModelViewSet composes five mixins to give six working CRUD endpoints from a few lines of code; how to override get_queryset, get_object, and get_serializer_context to filter per-request and pass computed data into serializers; how to override create/perform_create to save the instance and return a different serializer; and how the @action decorator adds a /books/featured endpoint without touching urls.py — all demonstrated as working patterns.
AI-written summary · about
chapters (9)
- 0:00Start
- 3:20What You Should Know About Django REST Framework
- 4:05ClassyDRF
- 6:05ModelViewSet = set of views to
- 7:40This ViewSet...
- 9:22What objects are you working with?
- 10:51When to override get_queryset()
- 13:18When to override get_serializer_context()
- 21:17DRF mixes and matches for you
related talks
25mWrite an API for Almost Anything (or The Amazing Power and Flexibility of Django Rest Framework)
33mDjango REST Framework: Moving Past the Tutorial to Production
26mDjango, REST and OpenAPI - a gentle introduction
27mThe Beauty of ViewSets in Django Rest Framework
23mDjango REST API - So easy you can learn it in 25 minutes
21mBuilding Powerful APIs with Django, Django Rest Framework, and OpenAPI
27mDjango REST Framework: Taking your API to the next level
38mDjango Rest Framework + Redux
