Skip to main content

A tailwind package for Django Crispy Forms

Project description

https://img.shields.io/badge/code%20style-black-000000.svg

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.

https://django-crispy-forms.github.io/crispy-tailwind/_images/crispy_form.png

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:

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

Documentation

The documentation for this project is available here: https://django-crispy-forms.github.io/crispy-tailwind/index.html

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-tailwind-0.4.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

crispy_tailwind-0.4.0-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file crispy-tailwind-0.4.0.tar.gz.

File metadata

  • Download URL: crispy-tailwind-0.4.0.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for crispy-tailwind-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0d6931e4a3307bf5f04f365ada3368aeb9299a1471122d73fa943e572674e748
MD5 c5ea98e4480856a270e6d83d3c881957
BLAKE2b-256 aec31bdc0d85bfdd16fe8f398b05eb9eea2bf43608d1b5158a7eeac95e785df8

See more details on using hashes here.

File details

Details for the file crispy_tailwind-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: crispy_tailwind-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for crispy_tailwind-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89acbe13d4cf1dcb160a3742e99642d0be2cfc57f48beba6917f82342379caae
MD5 32758870daf758b3a16c666ddcc9930a
BLAKE2b-256 1f9de0b4f23ebe21f2b110358a4fe8547365cda4a13b5a8f4d9250080a5600c7

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