tangentlabs/django-oscar — pull request #1190 by mbertheau (2014-02-07 10:19:31+00:00)
Title: Support dynamic formsets

These changes make it easier to implement dynamic formsets in implementations of oscar in two ways:

1. Initialize widgets like select2 and the wysiwyg editor only on visible elements. That way a hidden empty form template is left alone. The form template is usually cloned to add a new form to a formset. Cloning a select2 widget got select2 mighty confused (it didn't know the correct position of the `` and all cloned inputs were controlled by the same select widget).
2. Provide a function to initialize these widgets on a new form has been added dynamically.