Nest Django formsets for multi-level hierarchical editing
Project description
Formsets are a Django abstraction that make it easier to manage multiple instances of a single Form on a page. In 2009 I wrote a blog post about using nesting formsets using Django 1.1. This is a generic implementation of the technique described there, targeting Django 1.5 and later. A follow-up blog post provides additional context.
Installing
You can install Django Nested Formsets using your favorite package management tool. For example:
$ pip install django-nested-formset
You can also install the latest development version
$ pip install django-nested-formset==dev
After installing the package, you can use the nestedformset_factory function to create your formset class.
Developing
If you’d like to work on the source, I suggest cloning the repository and creating a virtualenv.
$ cd nested-formset $ virtualenv . $ source bin/activate $ python setup.py develop
The last line will install the installation and test dependencies.
To run the unit test suite, run the following:
$ python setup.py test
See Also
jquery.django-formset Dynamic creation of formsets from the empty formset.
License
This package is released under a BSD style license. See LICENSE for details.
News
0.1.2
Release date: 20 May 2014
Support for passing files to bound nested formsets
The media property now rolls up all nested media
Compatibility with Django 1.7.
0.1.1
Release date: 6 March 2014
Bump minor version number to get PyPI to index the development version link.
0.1
Release date: 6 March 2014
Initial release on PyPI
Project details
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
Hashes for django-nested-formset-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7611b0a5096e3febd355c1dc10f5a7151dba961b29883697e6a2d7db0e69f4f0 |
|
MD5 | 393e1159234535ecdcd090bbdb77a725 |
|
BLAKE2b-256 | 1e4d43d0c251b47b2406ea23f69d75526354d161f22a4bc000576ce8f3ec95cc |
Hashes for django_nested_formset-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ab5b60e597725b79804bca24fb5cc31895b6c259ddf60af13a7e23c2701e2db |
|
MD5 | 8a26cdc6c2f7717acaa630721a74ae62 |
|
BLAKE2b-256 | 700a3994eac0e2cba4b72070fefaef02981a27ab17dd6d4adda71c022c853d8e |