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 template pack for the wonderful django-crispy-forms.

WARNING

This project is still in it’s early stages of development and has not yet been published to PyPI. If you would like to try out the package please install from github directly. 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 projects INSTALLED_APPS. Also set tailwind as and 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. Currently 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 }}

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.

Files for crispy-tailwind, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size crispy_tailwind-0.2.0-py3-none-any.whl (38.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size crispy-tailwind-0.2.0.tar.gz (23.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page