What problem does it solve?
Projects and AI assistants often rely on outdated model knowledge and can generate code that uses deprecated or changed Django APIs, leading to broken implementations, security gaps, and migration surprises. This Skill consolidates verified diffs and guidance for Django 5.2–6.0 so developers and code-generating agents can detect and adapt to post-cutoff changes before writing or modifying code.
Core Features & Use Cases
- Models & ORM: Guidance on CompositePrimaryKey, AnyValue, StringAgg delimiter requirements, auto-refresh of expression fields, and Model.NotUpdated behavior.
- Templates & Rendering: Template partials, partial rendering syntax, simple_block_tag, and forloop.length for precise template updates and htmx partials.
- Security & Middleware: Built-in CSP middleware, nonce usage, and per-view overrides to harden template inline scripts/styles.
- Background Tasks & Async: Task decorator and enqueue/result APIs, AsyncPaginator, and notes on built-in backends versus production backends.
- Migration Planning: Breaking changes, deprecations, minimum Python and database versions, and actionable migration notes for safe upgrades.
Quick Start
Load the django-knowledge-patch and scan your Django project to identify and apply guidance for composite primary keys, CSP configuration, template partials, background tasks, AsyncPaginator usage, and migration requirements.