django-patterns
Django architecture patterns including DRF, ORM optimization, signals, middleware, and project structure
npx skills add rohitg00/awesome-claude-code-toolkit --skill django-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Django Patterns ## Project Structure Organize Django projects with a clear separation between apps, shared utilities, and configuration. ``` project/ config/ settings/ base.py local.py production.py urls.py wsgi.py apps/ users/ models.py serializers.py views.py services.py selectors.py urls.py tests/ orders/ ... common/ models.py permissions.py pagination.py ``` Keep business logic in `services.py` (write operations) and `selectors.py` (read operations). Views should remain thin. ## ORM Optimization ```python # select_related for ForeignKey / OneToOne (SQL JOIN) orders = Order.objects.select_related("customer", "customer__profile").all() # prefetch_related for ManyToMany / reverse FK (separate query) authors = Author.objects.prefetch_related( Prefetch("books", queryset=Book.objects.filter(published=True)) ).all() # Defer fields you don't need posts = Post.objects.defer("body", "metadata").filter(status="published") # Use .only() when you need just a few columns emails = User.objects.only("id", "email").filter(is_active=True) # Bulk operations Product.objects.bulk_create(products, batch_size=1000) Product.objects.bulk_update(products, ["price", "stock"], batch_size=1000) ``` Alway
- Project Structure
- ORM Optimization
- Django REST Framework Serializers
- Signals
- Custom Middleware
- Anti-Patterns
- Checklist
What does the django-patterns skill do?
Django architecture patterns including DRF, ORM optimization, signals, middleware, and project structure
How do I install it?
Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill django-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From rohitg00/awesome-claude-code-toolkit, a repository with 2,438 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.