martinsam
5/23/2013 - 1:22 PM

django: Formset parameters

django: Formset parameters

from django.utils.functional import curry
from django.forms.models import modelformset_factory

ManagerFormset = modelformset_factory(User, ManagerForm, extra=0)
ManagerFormset.form = staticmethod(curry(ManagerForm,  selected=selected, company=company))

form = ManagerFormset(queryset=coworkers)