Best way to have Django DRY forms
Project description
The best way to have Django DRY forms. Build programmatic reusable layouts out of components, having full control of the rendered HTML without writing HTML in templates. All this without breaking the standard way of doing things in Django, so it plays nice with any other form application.
django-crispy-forms supports Django 2.2, 3.0 and 3.1 with Python 3.5+. Note: Django 3.1 requires `django-crispy-forms` version 1.9 or higher.
Versions of django-crispy-forms prior to 1.9.0 also supported Python 2.7 and Django 1.11/2.1
The application mainly provides:
A filter named |crispy that will render elegant div based forms. Think of it as the built-in methods: as_table, as_ul and as_p. You cannot tune up the output, but it is easy to start using it.
A tag named {% crispy %} that will render a form based on your configuration and specific layout setup. This gives you amazing power without much hassle, helping you save tons of time.
Django-crispy-forms supports several frontend frameworks, such as Twitter Bootstrap (versions 2, 3, and 4), Uni-form and Foundation. You can also easily adapt your custom company’s one, creating your own, see the docs for more information. You can easily switch among them using CRISPY_TEMPLATE_PACK setting variable.
Example
This is a teaser of what you can do with latest django-crispy-forms. Find here the gist for generating this form:
Documentation
For extensive documentation see the docs folder or read it on readthedocs
Special thanks
To Daniel Feldroy (@pydanny) for his support, time and the opportunity given to me to do this.
The name of the project was suggested by the fantastic Audrey Feldroy (@audreyfeldroy)
To Kenneth Love (@kennethlove) for creating django-uni-form-contrib from which bootstrap template pack was started.
Project details
Release history Release notifications | RSS feed
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 django-crispy-forms-1.11.0.tar.gz
.
File metadata
- Download URL: django-crispy-forms-1.11.0.tar.gz
- Upload date:
- Size: 62.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21cf717b621f93cdf01bac0a419b520fe3b17bffd67e140b6c16558d9b75ab80 |
|
MD5 | d9457b6eeb9c10595eed1130ce468a85 |
|
BLAKE2b-256 | ede66999fded6f17c622e7f4aa6db6b947ec7d8706ea5094a560e98712f00498 |
File details
Details for the file django_crispy_forms-1.11.0-py3-none-any.whl
.
File metadata
- Download URL: django_crispy_forms-1.11.0-py3-none-any.whl
- Upload date:
- Size: 108.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2aa34ee3fccafdebb33c016cbd60246b37df85dae717637c6419b929fa24b25 |
|
MD5 | 1055271111de305627e379a21b82cda3 |
|
BLAKE2b-256 | 78d933b4707afcb099bebedca3b3b7ce71085e9b0facd7c5ac45ba767fea24ea |