title: Using a ForeignKey, NON NULL constraint failed
body: <p>I'm writing a website in Django, and I want to have different blogs for different categories of posts. I have a model Post, which uses a ForeignKey to the Blog model.</p>
  
  <p>Following the useful help I was given <a href="https://stackoverflow.com/questions/26801553/how-do-i-have-two-fields-for-a-choice/">here</a>, I have:</p>
  
  <pre><code>class Blog(models.Model):
      # category of the blog
      category = models.CharField(max_length=50)
      # its title (for the view)
      title = models.CharField(max_length=100)
      # its url (for url.py)
      url = models.URLField()
  
  class Post(models.Model):
      # blog
      blog = models.ForeignKey(Blog, null=True)
      # other fields
      # ...
  </code></pre>
  
  <p>Whenever I try <code>python manage.py migrate pad</code> I get </p>
  
  <pre><code>sqlite3.IntegrityError: NOT NULL constraint failed: pad_post__new.blog_id
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
  
  [...]
  
  django.db.utils.IntegrityError: NOT NULL constraint failed: pad_post__new.blog_id
  </code></pre>
  
  <p>Do I have to set an <code>id</code> in Blog explicitly? I tried with different combinations of <code>blank=null</code> and <code>null=True</code> in different fields, but I always get this error.</p>