Hello everyone,
after discussion on IRC with rasca I opened up a ticket [1] about
making FormSets declarable.
We have been down this route with ModelForm and it seems to make sense
to be able to declare your FormSet somewhere instead of having to
generate it.
The idea given is you can do:
class MyFormSet(formsets.FormSet):
can_delete = True
form = MyForm
extra = 3
This is almost possible already (BaseFormSet actually can be
subclassed if you add all the arguments to your definition), but it
might be interesting to think about the consequences. rasca is working
on extending CBV [2] which can use this.
In the mean time we looked at "removing" the factories, but for now
the admin makes good use of completely flexible generation of
ModelForm and ModelFormSets.
Ideas?
/Bas
[1]: https://code.djangoproject.com/ticket/16289
[2]: https://code.djangoproject.com/ticket/16256
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.