Django, REST and OpenAPI - a gentle introduction
summary
Shows how to bolt an API onto an existing Django site using Django REST Framework and drf-spectacular, with concrete code: a ReadOnlyModelViewSet + router that auto-creates router-generated URLs, serializers that include nested track lists and a custom serializer field to parse number.part mix identifiers, demo endpoints that return JSON, OpenAPI served with serve_public toggled so unauthenticated viewers only see allowed operations, and notes on authentication/permission classes and practical testing names — the demo code runs and the router introspection works.
AI-written summary · about
chapters (12)
- 0:00Django REST OpenAPI intro
- 1:09Building API for music project
- 2:18APIs and Django handling
- 5:55Simplifying views with viewsets
- 7:41Serializers in REST Framework
- 11:20Mapping URLs with routers
- 13:31Custom actions in viewsets
- 15:18Auth and permissions in REST
- 17:50Testing REST APIs
- 19:19OpenAPI Swagger docs
- 22:33Summary
- 23:15Q&A: Refactoring view.py
related talks
25mWrite an API for Almost Anything (or The Amazing Power and Flexibility of Django Rest Framework)
21mBuilding Powerful APIs with Django, Django Rest Framework, and OpenAPI
27mWhat You Should Know About Django REST Framework
23mDjango REST API - So easy you can learn it in 25 minutes
02h 54m🌐 Building Your First API with Django and Django Rest Framework
46mIntroducing Django REST framework
26mWhat it's really like building RESTful APIs with Django
27mBuilding a REST API with Django & Django REST Framework
