A tailwind package for Django Crispy Forms
Project description
A Tailwind CSS template pack for the wonderful django-crispy-forms.
WARNING
This project is still in its early stages of development. Any contributions to the package would be very welcomed.
Currently the template pack allows the use of the |crispy filter to style your form. Here is an example image.
How to install
Install via pip.
pip install crispy-tailwind
You will need to update your project’s settings file to add crispy_forms and crispy_tailwind to your project’s INSTALLED_APPS setting. Also set tailwind as an allowed template pack and as the default template pack for your project:
INSTALLED_APPS = ( ... "crispy_forms", "crispy_tailwind", ... ) CRISPY_ALLOWED_TEMPLATE_PACKS = "tailwind" CRISPY_TEMPLATE_PACK = "tailwind"
How to use
This project is still in its early stages.
Current functionality allows the |crispy filter to be used to style your form. In your template:
Load the filter: {% load tailwind_filters %}
Apply the crispy filter: {{ form|crispy }}
We can also use the {% crispy %} tag to allow usage of crispy-forms’ FormHelper and Layout. In your template:
Load the crispy tag: {% load crispy_forms_tags %}
Add FormHelper to your form and use crispy-forms to set-up your form
Use the crispy tag {% crispy form %} in your template
Documentation
The documentation for this project is available here: https://django-crispy-forms.github.io/crispy-tailwind/index.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for crispy_tailwind-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91446670d1a6fde850eb07b2be7c9ee3073ce56ce251d9812ea51dceca4203a3 |
|
MD5 | e9108c3b8c74dfaa907a9bc23813e33d |
|
BLAKE2b-256 | 51dcf1df61cfaf20545ca57e1c439bda070736b4d6b3d31bb8c2fb5ad8d1ffe3 |