#12915: formfield_callback is lost in an inherited ModelForm ---------------------+------------------------------------------------------ Reporter: semenov | Owner: nobody Status: new | Milestone: Component: Forms | Version: 1.1 Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------+------------------------------------------------------ Consider the following code: {{{ #!python class BaseTicketForm(forms.ModelForm): class Meta: fields = (...) formfield_callback = lambda f: ....
class AddTicketForm(BaseTicketForm): pass class EditTicketForm(BaseTicketForm): # some logic related to editing tickets here }}} When an instance of AddTicketForm or EditTicketForm is created, a user would expect that formfield_callback is applied. However, the current implementation doesn't do that; instead, a user is forced to copy-paste formfield_callback to each and every derived class. -- Ticket URL: <http://code.djangoproject.com/ticket/12915> Django <http://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-upda...@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.