#5810: Form subclass trying to override parent form field
-----------------------+----------------------------------------------------
Reporter: nwp | Owner: nobody
Status: new | Component: django.newforms
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 0
-----------------------+----------------------------------------------------
If a form subclass tries to override a parent form's field definition, the
definition is overridden but the field is repeated.
{{{
class FormA(forms.Form):
somefield = forms.AnyField(anyargs)
class FormB(FormA):
somefield = forms.OtherField(otherargs)
}}}
FormB ends up with *two* somefields, both forms.Otherfield. This seems to
me to be a bug in !DeclarativeFieldsMetaclass's {{{__new__}}} method - I
think it should do some checking for duplicates round about as it adds
fields to base_fields.
This is svn r6471.
--
Ticket URL: <http://code.djangoproject.com/ticket/5810>
Django Code <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 [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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---