#6967: ModelForms doesn't validate CHOICES
------------------------------------------------------------------+---------
Reporter: [EMAIL PROTECTED] | Owner: jacob
Status: reopened |
Milestone: 1.0
Component: Forms |
Version: SVN
Resolution: |
Keywords:
Stage: Accepted |
Has_patch: 0
Needs_docs: 0 |
Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------------------------------------+---------
Changes (by mattmcc):
* status: closed => reopened
* resolution: fixed =>
Comment:
The test was insufficient, unfortunately. Field.formfield is going to
need to cope with other model field types that set arbitrary arguments in
their defaults dict which would make sense for the form field they expect
to use, but won't make sense to TypedChoiceField. The only built-in
examples of this are PositiveIntegerField and PositiveSmallIntegerField,
which pass a min_value argument.
We could pop off min_value as max_length is being popped now, but it's
just fixing the symptom. A custom model field could set anything.
--
Ticket URL: <http://code.djangoproject.com/ticket/6967#comment:8>
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
-~----------~----~----~----~------~----~------~--~---