~/talk

Django, REST and OpenAPI - a gentle introduction

Talkat PyCon AU 2024 · 2024-11-22..11-26· [django, web-platform]
slides:none on file

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

  1. 0:00Django REST OpenAPI intro
  2. 1:09Building API for music project
  3. 2:18APIs and Django handling
  4. 5:55Simplifying views with viewsets
  5. 7:41Serializers in REST Framework
  6. 11:20Mapping URLs with routers
  7. 13:31Custom actions in viewsets
  8. 15:18Auth and permissions in REST
  9. 17:50Testing REST APIs
  10. 19:19OpenAPI Swagger docs
  11. 22:33Summary
  12. 23:15Q&A: Refactoring view.py
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.