A DaisyUI package for Django Crispy Forms
Project description
A daisyUI template pack for the wonderful django-crispy-forms.
This repository is a fork of crispy-tailwind and has been modified just enough to suit my needs. It works well for the most common forms elements.
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-daisyui
You will need to update your project’s settings file to add crispy_forms and crispy_daisyui to your project’s INSTALLED_APPS setting. Also set daisyui as an allowed template pack and as the default template pack for your project:
INSTALLED_APPS = ( ... "crispy_forms", "crispy_daisyui", ... ) CRISPY_ALLOWED_TEMPLATE_PACKS = "daisyui" CRISPY_TEMPLATE_PACK = "daisyui"
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 daisyui_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
Project details
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
File details
Details for the file crispy-daisyui-0.3.0.tar.gz
.
File metadata
- Download URL: crispy-daisyui-0.3.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f64e76b4115f26b48d0b112959ee7b3dedbdb1c315b5d7d837f584ce3334316 |
|
MD5 | 34fa22e789cd1e8612e7568f5dbea5d9 |
|
BLAKE2b-256 | 98b34627d2b41552de57a7d7a1414585e49215848451345ce6ec0c53d1b2c68c |
File details
Details for the file crispy_daisyui-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: crispy_daisyui-0.3.0-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94d297f3a368a17d46f9761446284278ed6aae2193ee87a5a8fd0935e655838c |
|
MD5 | 611809d31c27a0c20588ef122669b3b1 |
|
BLAKE2b-256 | 1e0cef9029615b288548e64dc46ae05529b629ee7620217e1ad5f40c65519052 |