elo80ka/django-dynamic-formset — pull request #80 by radiac (2014-10-29 08:53:10+00:00)
Title: Added options addWrap, deleteWrap, addInsert and formInsert

These changes introduce four new options, with docs and tests:
* ``addWrap`` and ``deleteWrap`` let you wrap the add and delete buttons in an element (or multiple nested elements - value is passed to jQuery's ``.wrap``) to make it easier to style the buttons and manage form layout.
* ``addInsert`` is a callback to manage where the add button is inserted. This can be used to put the add button at the top of the forms, or outside the formset altogether.

My particular use case is that I wanted to style the forms and buttons using CSS ``li:nth-child(even)``, and my hidden ``formTemplate`` fell between old and new forms, so was knocking the order out; this allows me to put the add button above the hidden ``formTemplate``, rather than at the bottom.
* ``formInsert`` is a callback to manage where and how the form is added. I've used it with jQuery's ``.slideDown``, but would also be used with the ``addInsert`` callback to add forms at the top of the formset (see test) or from an add button outside the formset.

Please note though that I only extended the current tests, so they only cover divs, not tables.

I also changed the indentation for formset options in usage.rst - github wasn't displaying anything after the first ``versionadded``.