What problem does it solve?
Provides clear architecture patterns and actionable guidance to avoid common pitfalls when building Django applications and DRF APIs, reducing technical debt and runtime performance issues.
Core Features & Use Cases
- Project Structure & Settings: Recommended split settings and layout for development, testing, and production deployments.
- Model & ORM Best Practices: Indexing, constraints, custom QuerySets/managers, and patterns to prevent N+1 queries.
- DRF & Service Layer Patterns: Serializer-per-action, ViewSet patterns, custom actions, and a service layer for transactional business logic.
- Caching, Signals, Middleware & Performance: Strategies for view/template/query caching, signal registration, middleware patterns, and bulk operations.
- Use Case: Harden a growing e-commerce Django app by reorganizing settings, optimizing queryset access with select_related/prefetch_related, adding sensible indexes, and implementing cached endpoints for heavy reads.
Quick Start
Use the django-patterns skill to review and optimize a Django project's settings, models, and DRF endpoints for production readiness.