DRF
2025
Django REST Framework: when (and when not) to override serializers and viewsets, part 2
Part 2 covers ViewSets: when to override create versus perform_create, how update, partial_update, and perform_update fit together, and a cheat sheet for where each kind of logic goes.
Django REST Framework: when (and when not) to override serializers and viewsets, part 1
Part 1 covers serializers: which methods to override for validation, saving, and output formatting, and what logic does not belong in a serializer at all.
Why Django REST Framework doesn't show your custom validation error messages (and what to do about it)
DRF validates at the serializer level and skips model full_clean(), so custom messages on model constraints never reach the API response. Three ways to work around it.