I'm wondering if this can be supported somehow. For a FormWithSets form
that requires a pre-filled in field (like current user), the only
conceivable way (for me) is to create something like:
def MyForm(user, *args, **kwargs):
class _MyForm(forms.ModelForm):
some_field = FormSetField(Model)
def save(self, *args, **kwargs):
return super(_MyForm, self).save(initialize={'user': user},
*args, **kwargs)
_MyFormSet = FormWithSets(_MyForm)
return _MyFormSet(*args, **kwargs)
That looks ugly.
I guess it is hard to identify which of the initialize entries are for
which form. Would it be a good idea to support a multi-level initialize
dictionary?
Original issue reported on code.google.com by google%o...@gtempaccount.com on 6 Aug 2009 at 6:23
Original issue reported on code.google.com by
google%o...@gtempaccount.com
on 6 Aug 2009 at 6:23