.cursor/skills/django-forms/SKILL.md
Django form handling patterns including ModelForm, validation, clean methods, and HTMX form submission. Use when building forms, implementing validation, or handling form submission.
npx skillsauth add AngelDann/app-comisions-dist django-formsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
commit=False when you need to modify the instance before savingField-level (clean_<field>):
ValidationErrorCross-field (clean):
super().clean() firstcleaned_dataself.add_error(field, message) for field-specific errorsrequest.method explicitlyrequest.POST for POST, empty for GETform.save(commit=False) to set additional fields (e.g., author)HTMX handling:
request.headers.get("HX-Request") for HTMX requestsHX-Trigger header to notify other componentsform.non_field_errors for cross-field errorsfield.errors for each field_form.html) for HTMX responseshx-indicatorMeta.widgets dictattrs parameterTextarea(attrs={"rows": 5}), DateTimeInput(attrs={"type": "datetime-local"})inlineformset_factory for related model collectionsform.is_valid() and formset.is_valid()instance for editing existing parent objectsis_valid()commit=False when setting related fieldsAdapted from claude-code-django (.claude/skills/django-forms).
development
pytest-django testing patterns, Factory Boy, fixtures, and TDD workflow. Use when writing tests, creating test factories, or following TDD red-green-refactor cycle.
development
HTMX patterns for Django including partial templates, hx-* attributes, and dynamic UI without JavaScript. Use when building interactive UI, handling AJAX requests, or creating dynamic components.
development
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
development
Check if documentation is in sync with code. Use when the user wants to verify that documentation matches current code, find outdated docs, or audit documentation accuracy. Triggers on requests like "check docs", "sync documentation", "are the docs up to date", "/docs-sync".