django

Solid

Use when building Django applications. Covers ORM query performance, model design, migrations, Django REST Framework, security defaults, and testing.

API & Backend 26 stars 3 forks Updated 3 weeks ago MIT

Install

View on GitHub

Quality Score: 83/100

Stars 20%
48
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Django ## Purpose Build Django applications that use the ORM efficiently and the framework's security defaults correctly. Most Django performance problems are one missing `select_related` away from being fixed. ## When to Use - Building or reviewing a Django application or DRF API. - Diagnosing slow views caused by the ORM. - Writing migrations that must run against a large table. - Auditing Django security settings before launch. ## Capabilities - ORM: `select_related`, `prefetch_related`, annotations, subqueries, bulk operations. - Model design: constraints, indexes, and validation at the database level. - Migrations, including zero-downtime patterns for large tables. - Django REST Framework: serializers, viewsets, permissions, pagination. - Security: the settings that must not be wrong in production. ## Inputs - The application, its models, and the slow view or endpoint if there is one. - Table sizes, for anything involving migrations. - Deployment environment and settings module. ## Outputs - Views with a bounded, predictable query count. - Migrations that do not lock a large table. - Settings that pass `manage.py check --deploy`. ## Workflow 1. **Count the queries** — `assertNumQueries` in tests, `django-debug-toolbar` in development. An N+1 is invisible until you count. 2. **Fix them at the queryset** — `select_related` for forward foreign keys (a join), `prefetch_related` for reverse and many-to-many (a second query). Not both, not neither. 3. **Push work...

Details

Author
nimadorostkar
Repository
nimadorostkar/Claude-Skills-collection
Created
1 months ago
Last Updated
3 weeks ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category