Thursday, June 9, 2011

Re: Boolean field, unexpected behavior

On 06/09/2011 03:42 PM, elliot wrote:
> to my great annoyance, not specifying active has lead to the objects
> being created as I wanted. But I cannot rely on this. Seems like
> m.active is true if either true or false is specified, and is false if
> it is never initialized.

See my previous e-mail. If you specify the string 'True' or 'False'
it'll always evaluate to True.

Also, set a default value in your model.


--
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


Real Estate