This library offers an improved replacement for Django’s own form rendering methods (as_p, as_table etc.) while staying simple and extensible but without introducing a whole new framework.
django-fineforms consists of a template tag library and a few opinionated default templates.
Goals
Stay simple and extensible
Avoid options, settings and customizability as much as possible
Non-goals
Compete with django-crispy-forms or any of the more flexible libraries out there
Installation
Simply pip install django-fineforms, and add fineforms to your INSTALLED_APPS.
High-level overview
The template tags mostly wrap their arguments in wrapper classes that do the real work. For example, {% ff_field %} simply wraps the passed field in a wrapper defined in the FINEFORMS_WRAPPERS setting. All wrappers use a template to render their output. The default wrapper types are as follows:
{
"errors": ErrorsWrapper,
"field": FieldWrapper,
"field-plain": PlainFieldWrapper,
"fields": FieldsWrapper,
}
The wrappers themselves mostly aren’t configurable, but you can replace individual wrappers (or all of them) by adding a FINEFORMS_WRAPPERS setting. You do not have to override all of them; if you only want to add another wrapper for a specific field type you could just set:
FINEFORMS_WRAPPERS = {
"specific": "app.wrappers.SpecificWrapper",
}
… and use this wrapper as {% ff_field some_field type='specific' %} somewhere in your templates.
Release files for django-fineforms 0.7.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 | |
|---|---|---|---|
| django_fineforms-0.7.0.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_fineforms-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.8 kB
Release files / django_fineforms-0.7.0.tar.gz
| Download URL | django_fineforms-0.7.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b09dbf10dad99b84d9910d50129bc74fbb76ca127c126e5cc80538c1f95d3a4f
|
|
BLAKE2b-256 checksum How to use checksums |
9f71ee5a1dfd014f9b39ddb07387fb7021945401f1d301e6623d9e13acb58a8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.3
|
Release files / django_fineforms-0.7.0-py3-none-any.whl
| Download URL | django_fineforms-0.7.0-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4465f1157dc000e3f15a7f829b27bf75f0156723aae3b56847dc440d91bc7fd9
|
|
BLAKE2b-256 checksum How to use checksums |
ed654a293374ba14024872af00604521f00b8167c04764cf6749ab848ebad7e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.23.3
|