Re: Django 1.1.1 - Can't get form validation working
Karen Tracey wrote:
> Ah, right. Thanks for pointing out the explanation. Doing something to
> make Django fail loudly for stuff like this (I recall it tripping up someone
> once on a model definition as well) might be worthwhile. The current
> no-error-but-really-confusing-results behavior is not ideal.
Kinda tricky because assigning some tuple to some class field for some
other not-a-django-formfield purpose is probably a reasonable thing to do.
class MyForm(forms.Form):
MYCHOICES = ("foo", "bar", "baz")
myfield = forms.ChoiceField(choices=MYCHOICES)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home