#18166: Allow the formset class to contribute kwargs to form instances -------------------------------------+------------------------------------- Reporter: tevans | Owner: nobody Type: New feature | Status: new Component: Forms | Version: SVN Severity: Normal | Resolution: Keywords: forms formset | Triage Stage: kwargs | Unreviewed Has patch: 1 | Needs documentation: 1 Needs tests: 1 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by tevans): Replying to [comment:4 akaariai]: > Just as an idea: how about defining a new method: > {{{ > def get_single_form(self, i, defaults): > """ > Override me to have total control over the single forms. > """ > return self.form(**defaults) > }}} > and use that instead of self.form() in the _construct_form() method. This would be more powerful and easier to implement. Yes, I like that. I would like to also keep the idea of being able to contribute to a form's kwargs without defining a {{{BaseFormSet}}} subclass, eg by passing them to {{{BaseFormSet.__init__}}}. I should get some time this w/e to re-roll the patch. -- Ticket URL: <https://code.djangoproject.com/ticket/18166#comment:5> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.