affaan-m avatar

Django Patterns

This one teaches you production-grade Django architecture patterns, from project structure to deployment. It covers the split settings pattern (base, dev, production), custom QuerySet and Manager methods to avoid N+1 queries, DRF serializers with proper validation, and the service layer pattern to keep business logic out of views. The code examples are solid and show real patterns you'd actually use, like prefetch_related for many-to-many relationships and proper model indexing. If you're moving past tutorial Django and need to structure a maintainable codebase with proper caching, middleware, and signals, this gives you the patterns without the usual handwaving about best practices.

skills.sh installs
6.2K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add affaan-m/ecc --skill django-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Django Development Patterns

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

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 Settings Pattern

# config/settings/base.py
from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent.parent.parent

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, Code Review & Quality, Python, Design & UI/UX, Databases
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263
1jeffallan avatarnestjs-expertjeffallan/claude-skillsCreates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when buil6.2Kskills.sh installs
2vercel-labs avatarportlessvercel-labs/portlessSet up and use portless for named local dev server URLs (e.g. https://myapp.localhost instead of http://localhost:3000). Use when integrating portless into a pr6.2Kskills.sh installs
3affaan-m avatarlaravel-patternsaffaan-m/eccLaravel architecture patterns, routing/controllers, Eloquent ORM, service layers, queues, events, caching, and API resources for production apps.6.1Kskills.sh installs
4affaan-m avatarspringboot-patternsaffaan-m/eccSpring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging. Use for Java Spring Boot backend work6.1Kskills.sh installs
5jeffallan avatarnextjs-developerjeffallan/claude-skillsUse when building Next.js 14+ applications with App Router, server components, or server actions. Invoke to configure route handlers, implement middleware, set 6Kskills.sh installs
6wordpress avatarwordpress-routerwordpress/agent-skillsUse when the user asks about WordPress codebases (plugins, themes, block themes, Gutenberg blocks, WP core checkouts) and you need to quickly classify the repo 6Kskills.sh installs