Skip to main content

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:

  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.5.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

crispy_daisyui-0.5.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file crispy_daisyui-0.5.0.tar.gz.

File metadata

  • Download URL: crispy_daisyui-0.5.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for crispy_daisyui-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e1207359c1a987662ef54722f4dadd30eb17dee42a507e16c662d0035cb28aa7
MD5 84fdb689dbe80da790b177253d01977e
BLAKE2b-256 452a5b2e2561b626a54185ff3942d62afbbe985f9e6eb77c9f6e557a6716248e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crispy_daisyui-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43be74e029eb65e4373ac5283d826eeabf6bc4e19af72084dd1075135e9118ac
MD5 a2a9d86b0e7dd08c3104f98f65a60fe0
BLAKE2b-256 a94bbc4bdca28269546bff8b251b8355898b30044098700e73edef989b0af2eb

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