我有这个简单的博客模型:
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)
当我在管理界面中插入博客时,出现此错误:
IntegrityError at /admin/blogs/blog/add/
null value in column "is_public" violates not-null constraint
为什么 ???