← ClaudeAtlas

django-patternslisted

Django + Django REST Framework implementation discipline — project layout, model design, DRF serializers/viewsets, service layer, caching, signals, middleware, query performance, AND the full Django security surface (SECURE_* settings, authentication, authorization, SQL-injection and XSS prevention, CSRF, file-upload hardening, API security, security headers, secret handling, security event logging). Use when writing or reviewing any Django models.py, views.py, serializers.py, urls.py, settings.py, middleware or migration.
Nmor/the-claude-council · ★ 9 · API & Backend · score 69
Install: claude install-skill Nmor/the-claude-council
# Django Development Patterns > **Reuse-first** (per `~/.claude/rules-library/common/reuse-first.md`): > One source of truth per Django concept — one base > `ModelSerializer` per shared shape, one custom permission > class per access rule, one mixin per cross-cutting view > behaviour, one signal handler per event. Sweep `apps/<app>/` > for existing primitives before adding new ones. Extend via > subclass / mixin / Meta inheritance — never fork a serializer > or view into a parallel near-duplicate. Production-grade Django architecture patterns for scalable, maintainable applications. ## When to Activate - Building Django web applications - Designing Django REST Framework APIs - Working with Django ORM and models - Setting up Django project structure - Implementing caching, signals, middleware ## Project Structure ### Recommended Layout ```text myproject/ ├── config/ │ ├── __init__.py │ ├── settings/ │ │ ├── __init__.py │ │ ├── base.py # Base settings │ │ ├── development.py # Dev settings │ │ ├── production.py # Production settings │ │ └── test.py # Test settings │ ├── urls.py │ ├── wsgi.py │ └── asgi.py ├── manage.py └── apps/ ├── __init__.py ├── users/ │ ├── __init__.py │ ├── models.py │ ├── views.py │ ├── serializers.py │ ├── urls.py │ ├── permissions.py │ ├── filters.py │ ├── services.py │ └── tests/ └── products/ └── ... ``` ### Split Setti