django-crispy-forms
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.
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 1.1.0 has built-in support for two different CSS frameworks, known as template packs within django-crispy-forms:
bootstrap The default template pack. The popular simple and flexible HTML, CSS, and Javascript for user interfaces from Twitter.
Uni-form Nice looking, well structured, highly customizable, accessible and usable forms.
But you can create a template pack for your own CSS framework and submit it. see the docs for more information. You can easily switch between both using CRISPY_TEMPLATE_PACK setting variable, setting it to bootstrap or uni_form.
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 Greenfeld (@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 Roy (@audreyr)
To Kenneth Love (@kennethlove) for creating django-uni-form-contrib from which bootstrap template pack was started.
Note
django-crispy-forms supports Django 1.3 or higher with Python 2.6.x, Python 2.7.x and Python 3.3.x. If you need to support Python 2.5 or Django 1.2 you will need to use a version of django-crispy-forms less than 1.3. For earlier versions of Django or Python you will need to use django-uni-form 0.7.0.
Metadata
Release files for django-crispy-forms 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-crispy-forms-1.3.1.tar.gz | 79.6 kB | Without provenance | Details for django-crispy-forms-1.3.1.tar.gz |
Release files / django-crispy-forms-1.3.1.tar.gz
| Download URL | django-crispy-forms-1.3.1.tar.gz |
|---|---|
| Size | 79.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
312b2c93f12533d4e6d1df8cab0a0c4cc513284379faa8ac7bb47dd62f27b235
|
|
BLAKE2b-256 checksum How to use checksums |
58d237bb9d8bd5b2cf23b901d32139589329c9e2731a4e6256b7bbac6b531c29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-crispy-forms 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.