#12510: ModelChoiceField.clean call to_python and validate from ChoiceField
---------------------------------------------------+------------------------
Reporter: Petr Marhoun <[email protected]> | Owner: nobody
Status: new | Milestone:
Component: Forms | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 1 |
---------------------------------------------------+------------------------
Comment in !ModelChoiceField says: This class is a subclass of
!ChoiceField for purity, but it doesn't actually use any of !ChoiceField's
implementation.
But with model level validation method !ModelChoiceField.clean calls
Field.clean and it calls self.to_python and self.validate, in reality
!ChoiceField.to_python and !ChoiceField.validate. And for
!ModelChoiceField these methods are useless and can be harmful - for
example (my problem) with hidden !ModelChoiceField choices were not
created but they are now, it could be very ineffective.
--
Ticket URL: <http://code.djangoproject.com/ticket/12510>
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 [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.