#15126: Misleading error in ModelForm
-------------------------------------------+--------------------------------
Reporter: ingo@… | Owner: nobody
Status: new | Milestone:
Component: Forms | Version: 1.2
Resolution: | Keywords: modelform fields
attributeerror widget subset
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 |
-------------------------------------------+--------------------------------
Comment (by bpeschier):
The above patch tests both fields and exclude for the error. It also
includes an extension of the forms-testsuite which tests whether or not
the validation is done.
I have two comments with the patch; it would be nice if somebody would
reflect on them
1. The patch tests specifically for 'str' because I did not want to impair
fancy gizmos and create a regression (the docs are not specific on what
kind of list fields should be). Testing for string tests for the common
mistake without restricting other iterables
2. I was not that familiar with testing exceptions thrown by class
definitions, so I would appreciate a second opinion on them :-)
--
Ticket URL: <http://code.djangoproject.com/ticket/15126#comment:2>
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.