Loading...
Loading...
Django template patterns including inheritance, partials, tags, and filters. Use when working with templates, creating reusable components, or organizing template structure.
npx skill4agent add kjnez/claude-code-django django-templatestemplates/
├── base.html # Root template with common structure
├── partials/ # Reusable fragments (navbar, footer, pagination)
├── components/ # UI components (button, card, modal)
└── <app>/ # App-specific templates
├── list.html # Full pages extend base.html
├── detail.html
├── _list.html # HTMX partials (underscore prefix)
└── _form.htmllist.htmldetail.htmlform.html_list.html_card.htmlpartials/_navbar.htmlpartials/_pagination.htmlcomponents/_button.htmlcomponents/_modal.htmltitle{{ block.super }}contentextra_cssextra_js{% include "components/_button.html" with text="Submit" variant="primary" %}only{% include "_card.html" with title=post.title only %}simple_taginclusion_tagapps/<app>/templatetags/<app>_tags.py__init__.pyuser.can_moderateuser.role == "admin" or user.role == "moderator"{% url 'posts:detail' pk=post.pk %}/posts/{{ post.id }}/class="error-message"style="color: red;"{% empty %}