Django REST API - So easy you can learn it in 25 minutes
summary
Promises to teach enough to get a working API in 25 minutes and actually walks through concrete code: serializers as forms that map Tweet model fields to JSON and include field and cross-field validators; permission examples that limit edits to the author; model viewsets give full CRUD plus router commands that auto-generate list and detail endpoints; unit test example that posts invalid data expecting HTTP 400; demo of the browsable API and notes on when DRF struggles with legacy, tightly coupled models.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:31HTTP Verbs
- 1:52What do REST endpoints look like?
- 2:47Common HTTP Response Codes
- 3:29Idempotency
- 4:51And a ModelSerializer
- 5:38The Result
- 6:13Field Validation
- 7:38Permissions
- 8:55ModelViewSets
- 10:14Generic Views
- 11:11Requests
- 11:54Responses
- 13:17ViewSet Routing
- 16:34Does our validation work?
- 18:11When to use it?
- 18:52When to be cautious (IMHO)
- 20:00Next Steps
related talks
26mDjango, REST and OpenAPI - a gentle introduction
25mWrite an API for Almost Anything (or The Amazing Power and Flexibility of Django Rest Framework)
27mWhat You Should Know About Django REST Framework
27mDjango REST Framework: Taking your API to the next level
21mBuilding Powerful APIs with Django, Django Rest Framework, and OpenAPI
33mDjango REST Framework: Moving Past the Tutorial to Production
27mThe Beauty of ViewSets in Django Rest Framework
26mWhat it's really like building RESTful APIs with Django
