On Thu, Jun 25, 2009 at 9:46 AM, Chris Withers <ch...@simplistix.co.uk>wrote:
> > steveneo wrote: > > BooleanField limits only to CheckBox? But I set > > widget=HiddenField.... It does not report error. HTML renders > > correctly, but actually, you can not use like that?! > > Didn't you hear me: I said go find another framework, Django obviously > sucks because one new user can't get his head around it ;-) > Please don't be rude. Perhaps your emoticon at the end was intended to convey a light comical tone but tone is extremely hard to convey in email and telling someone to go away because they've expressed some frustration strikes me as rude. Everyone is free to simply not respond to anyone they feel is expressing unreasonable frustration; I don't see that it helps matters much to try to tell them they are being unreasonable. To the original poster, if you read the documentation on django.forms.BooleanField: http://docs.djangoproject.com/en/dev/ref/forms/fields/#booleanfield you'll see it doesn't say anything about the validation behavior being dependent on the widget in use. So it doesn't matter what widget you use, if you want to be able to validate False as a valid value, then you need to include required=False in the form field definition. (There was a huge long contentious discussion about required=True implying a BooleanField value must be True in order for the field to pass validation -- you could find in the ticket tracker if you looked for it. Not everyone agrees with the choice made, but it was clearly an issue where not everyone was going to agree no matter what decision was made. It's been made and won't be changed and the way to make your case work is simply pass required=False on the form field definition.) Karen --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---