Nest Django formsets for multi-level editing.
Switch branches/tags
Latest commit a361b96 Jun 9, 2017 @jdufresne jdufresne committed with Update tox test matrix to match Travis CI
Tox can now be used for testing all supported Python and Django
versions. Use tox-travis to reduce the duplication of testing
configuration. Travis will now use the tox configuration to build all
environments. Easier to keep in sync.


Django Nested Formsets

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.8 and later. A follow-up blog post provides additional context.


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 git+

After installing the package, you can use the nestedformset_factory function to create your formset class.


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 develop

The last line will install the installation and test dependencies.

To run the unit test suite, run the following:

$ python test

See Also


This package is released under a BSD style license. See LICENSE for details.