con un clic
button-template
How to implement Django Spire buttons in HTML templates.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
How to implement Django Spire buttons in HTML templates.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Service layer best practices on django models
How to implement badges in html templates.
How to implement container templates in Django Spire.
How to implement tab templates in Django Spire.
How to implement table templates in Django Spire.
Best practice for working with Django models
| name | button-template |
| description | How to implement Django Spire buttons in HTML templates. |
└── django_spire/
└── button/
├── accent_button.html
├── accent_dark_button.html
├── accent_outlined_button.html
├── danger_button.html
├── danger_dark_button.html
├── danger_outlined_button.html
├── primary_button.html
├── primary_dark_button.html
├── primary_outlined_button.html
├── secondary_button.html
├── secondary_dark_button.html
├── secondary_outlined_button.html
├── success_button.html
├── success_dark_button.html
├── success_outlined_button.html
├── warning_button.html
├── warning_dark_button.html
└── warning_outlined_button.html
Django Spire provides various button styles:
All buttons extend the base button template which includes:
{% include 'django_spire/button/accent_button.html' with button_text='Accent Button' %}
{% include 'django_spire/button/accent_dark_button.html' with button_text='Dark Accent Button' %}
{% include 'django_spire/button/accent_outlined_button.html' with button_text='Outlined Accent Button' %}
{% include 'django_spire/button/danger_button.html' with button_text='Danger Button' %}
{% include 'django_spire/button/danger_dark_button.html' with button_text='Dark Danger Button' %}
{% include 'django_spire/button/danger_outlined_button.html' with button_text='Outlined Danger Button' %}
{% include 'django_spire/button/primary_button.html' with button_text='Primary Button' %}
{% include 'django_spire/button/primary_dark_button.html' with button_text='Dark Primary Button' %}
{% include 'django_spire/button/primary_outlined_button.html' with button_text='Outlined Primary Button' %}
{% include 'django_spire/button/secondary_button.html' with button_text='Secondary Button' %}
{% include 'django_spire/button/secondary_dark_button.html' with button_text='Dark Secondary Button' %}
{% include 'django_spire/button/secondary_outlined_button.html' with button_text='Outlined Secondary Button' %}
{% include 'django_spire/button/success_button.html' with button_text='Success Button' %}
{% include 'django_spire/button/success_dark_button.html' with button_text='Dark Success Button' %}
{% include 'django_spire/button/success_outlined_button.html' with button_text='Outlined Success Button' %}
{% include 'django_spire/button/warning_button.html' with button_text='Warning Button' %}
{% include 'django_spire/button/warning_dark_button.html' with button_text='Dark Warning Button' %}
{% include 'django_spire/button/warning_outlined_button.html' with button_text='Outlined Warning Button' %}
Each button template accepts the following parameters:
button_text: Text to display on the buttonbutton_href: URL to navigate to when clicked (optional)button_url_params: Additional URL parameters (optional)x_button_click: JavaScript click handler (optional)button_modal_href: Modal view href (optional)button_icon: Bootstrap icon class (e.g., 'bi bi-plus')button_class: Additional CSS classes (optional)button_attributes: Additional HTML attributes (optional){% url 'partner:form:page' pk=partner.id as form_url %}
{% include 'django_spire/button/primary_button.html' with button_text='Edit' button_icon='bi bi-pencil' button_href=form_url %}
Use appropriate button colors for their purpose:
Always provide meaningful text labels for accessibility
Use icons sparingly and only when they enhance usability
Maintain consistent button sizes and spacing throughout the application
Test buttons with keyboard navigation and screen readers
Use Django's {% url %} template tag for consistent URL generation