Skip to main content

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:

  1. Load the filter: {% load daisyui_filters %}
  2. 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:

  1. Load the crispy tag: {% load crispy_forms_tags %}
  2. Add FormHelper to your form and use crispy-forms to set-up your form
  3. 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

crispy_daisyui-0.7.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

crispy_daisyui-0.7.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

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

Hashes for crispy_daisyui-0.7.0.tar.gz
Algorithm Hash digest
SHA256 dad4e713b1b321f69985c10793cb08442281d385c6615cf02d85fb5fb720a093
MD5 b411a7894c2f4326f53b34139d376339
BLAKE2b-256 ef3a78d9d81882790f2fe0d6148ba3c23fb61e857e4dfd3a6d388bebef180972

See more details on using hashes here.

File details

Details for the file crispy_daisyui-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crispy_daisyui-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8215212202095879c38a368d06f9332d0a3aa1c89e9448930bcd1b4ec99b321f
MD5 0a47f9f742f629d3c849e7762937f04c
BLAKE2b-256 48a7a38fcd79707c85e4b90b655c435c76bd216e016f70509c0aa2d97c5e67f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page