django_reform
Control of widgets in templates sans BS.
Installation
We are at the cheeseshop:
pip install django_reform
Usage
To use django_reform in a project:
Include it in INSTALLED_APPS in your settings file.
Render your forms like so:
{% load reform %} {{ reform form }}Open reform/templates/reform/field.html - by default rendering HTML5 input types. Go ahead and tweak:
{% load widget_tweaks reform %} {% with field_type=field|get_form_field_type %} {% if field_type == 'DateField' %} {% render_field field type="date" %} {% elif field_type == 'EmailField' %} {% render_field field type="email" %} {% elif field_type == 'URLField' %} {% render_field field type="url" %} {% else %} {{ field }} {% endif %} {% endwith %}Advanced usage - controlling which fields to include, order of the fields as well as number of columns in which the form is rendered. The code below will render a form with the given fields, bootstrap vertical layout, no float and using 3-columns:
{% reform form 'email, number, url, time' 'vertical,false,3' %}
Sans BS as promised :)
History
0.1.0 (2013-11-25)
First release on PyPI.
0.1.1 (2013-11-25)
Basic documentation.
0.2.0 (2013-12-8)
Added replacement for bootstrap_toolkit’s as_bootstrap template filter. The reform template tag passed the original template context to the form templates enabling checks for instance for permissions etc.
0.2.1 (2013-12-8)
Added bootstrp CDN.
0.3.0 (2013-12-10)
Added bootstrp for field inclusions and orderings as well a multi-column layouts.
Metadata
Release files for django_reform 0.3.0
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 | |
|---|---|---|---|---|
| django_reform-0.3.0.tar.gz | 6.7 kB | Without provenance | Details |
Release files / django_reform-0.3.0.tar.gz
| Download URL | django_reform-0.3.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
634213cef58274f18e2c03886a550b9ba94f6e8d10aed06174ef98aa09232718
|
|
BLAKE2b-256 checksum How to use checksums |
818da63f36e585abedf3b7a865b8578099eccd03f3c6a7712a175bf0cca5a4fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django_reform 0.3.0
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.