On Thu, 10 Feb 2011 14:27:18 +0100, Roman Klesel <roman.kle...@googlemail.com> wrote: > 2011/2/10 <xordo...@linovia.com>: >>>>> '' == None >> False > > yes, makes sense ... I was thinking of things like: > > if '': > if []: > ... > > which probably lead me to a wrong conclusion.
I apologize for the previous message being a bit rude. Python is a strongly typed language so the empty string is pretty different from None. null=True means you can leave a value to None blank=True means the user can leave a form field empty If you assign your charfield an empty string then it is not empty any longer. Might be easier to figure if you were using numbers were None might say you have no result and 0 that you have a result which is 0. Regards, Xavier. -- 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.