drf-patternslisted
Install: claude install-skill ku5ic/dotfiles
# Django REST Framework patterns
DRF approximately v3.16. Supports Django 4.2, 5.0, 5.1, 5.2, 6.0 and Python 3.10-3.14. Verify current version at https://pypi.org/project/djangorestframework/. Adapt advice to the version in the project's `requirements.txt`, `pyproject.toml`, or lockfile.
## When to load this skill
- Project contains `djangorestframework` in `requirements.txt`, `pyproject.toml`, or `Pipfile`
- `rest_framework` appears in `INSTALLED_APPS`
- Files named `serializers.py`, `viewsets.py`, `permissions.py` in a Django app
- User asks about DRF, serializers, viewsets, permission_classes, throttle_classes, API versioning
## When not to load this skill
- Django-only projects without DRF
- FastAPI or other Python API frameworks
- GraphQL with graphene-django (different serialization model)
## Reference files
| File | Topics |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
| [serializers.md](reference/serializers.md) | Explicit fields, validate(), nested serializers, SerializerMethodField, ModelSerializer |
| [viewsets-and-routers.md](reference/viewsets-and-routers.md) | ModelViewSet vs GenericViewSet + mixins, @action, DefaultRouter