Today I'm going crazy. I just tried to insert a new entry and it threw the error "post_blogpost.id cannot be NULL". Here is my model:
class BlogPost(models.Model):
title = models.CharField(max_length=100)
slug = models.SlugField(max_length=100)
who = models.ForeignKey(User, default=1)
when = models.DateTimeField()
intro = models.TextField(blank=True, null=True)
content = models.TextField(blank=True, null=True)
counter = models.PositiveIntegerField(default=0)
published = models.BooleanField(default=False)
css = models.TextField(blank=True, null=True)
class Meta:
ordering = ('-when', 'id')
There are many functions under the model, but I will not include them here in full. Their names are: content_cache_key, clear_cache, __unicode__, reads, read, processed_content.
I add through the administrator ... And my hair is running out.
source
share