On Sat, 2007-03-10 at 11:53 -0600, Greg Donald wrote:
> Why doesn't this prevent me from entering an empty string into the database?
> 
> name = models.CharField(maxlength=32, blank=False, null=False)

I assume you mean via some way other than a form or the admin interface,
because in those two cases, field validation should catch it. At the
database level, the only thing that applies is null=False, which means
the column must contain a non-NULL value. An empty string is non-NULL,
so it satisfies the column constraint.

Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to