Django says the "id may not be NULL" but why is it?
- by Oli
I'm going crazy today. I just tried to insert a new record and it threw back a "post_blogpost.id may not be NULL" error. Here's 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()
…