A DaisyUI package for Django Crispy Forms
Project description
crispy-daisyui
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.
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
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.7.0.tar.gz
.
File metadata
- Download URL: crispy_daisyui-0.7.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dad4e713b1b321f69985c10793cb08442281d385c6615cf02d85fb5fb720a093 |
|
MD5 | b411a7894c2f4326f53b34139d376339 |
|
BLAKE2b-256 | ef3a78d9d81882790f2fe0d6148ba3c23fb61e857e4dfd3a6d388bebef180972 |
File details
Details for the file crispy_daisyui-0.7.0-py3-none-any.whl
.
File metadata
- Download URL: crispy_daisyui-0.7.0-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8215212202095879c38a368d06f9332d0a3aa1c89e9448930bcd1b4ec99b321f |
|
MD5 | 0a47f9f742f629d3c849e7762937f04c |
|
BLAKE2b-256 | 48a7a38fcd79707c85e4b90b655c435c76bd216e016f70509c0aa2d97c5e67f0 |