# Django

> Use for Django-specific model, ORM, view, middleware, migration, admin, transaction, or application-structure work.

- Skill: `rhenter/django` (Agent Skill)
- Install (CLI): `npx skillmds@latest add rhenter/django`
- Raw SKILL.md: https://api.skillmd.com/api/skills/rhenter/django/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: rhenter (https://skillmd.com/u/rhenter)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/rhenter/django

---


# Django

- Prefer the ORM over raw SQL unless raw SQL has a concrete benefit.
- Prevent N+1 queries with `select_related()` / `prefetch_related()` when appropriate.
- Keep views thin and business logic appropriately separated.
- Use transactions when multiple writes must be atomic.
- Create migrations only when model changes require them.

