IntegrityError with Booleand Fields and Postgresql

Posted by xRobot on Stack Overflow See other posts from Stack Overflow or by xRobot
Published on 2010-05-27T16:30:25Z Indexed on 2010/05/27 16:31 UTC
Read the original article Hit count: 130

I have this simple Blog model:

class Blog(models.Model):

    title = models.CharField(_('title'), max_length=60, blank=True, null=True)
    body = models.TextField(_('body'))
    user = models.ForeignKey(User)  
    is_public = models.BooleanField(_('is public'), default = True)

When I insert a blog in admin interface, I get this error:

IntegrityError at /admin/blogs/blog/add/

null value in column "is_public" violates not-null constraint

Why ???

© Stack Overflow or respective owner

Related posts about database

Related posts about django