title: Getting TypeError: __init__() missing 1 required positional argument: 'on_delete' when trying to add parent table after child table with entries
body: <p>I have two classes in my sqlite database, a parent table named <code>Categorie</code> and the child table called <code>Article</code>. I created first the child table class and addes entries. So first I had this:</p>
  
  <pre><code>class Article(models.Model):
      titre=models.CharField(max_length=100)
      auteur=models.CharField(max_length=42)
      contenu=models.TextField(null=True)
      date=models.DateTimeField(
          auto_now_add=True,
          auto_now=False,
          verbose_name="Date de parution"
      )
  
      def __str__(self):
          return self.titre
  </code></pre>
  
  <p>And after I have added parent table, and now my <code>models.py</code> looks like this:</p>
  
  <pre><code>from django.db import models
  
  # Create your models here.
  class Categorie(models.Model):
      nom = models.CharField(max_length=30)
  
      def __str__(self):
          return self.nom
  
  
  class Article(models.Model):
      titre=models.CharField(max_length=100)
      auteur=models.CharField(max_length=42)
      contenu=models.TextField(null=True)
      date=models.DateTimeField(
          auto_now_add=True,
          auto_now=False,
          verbose_name="Date de parution"
      )
      categorie = models.ForeignKey('Categorie')
  
      def __str__(self):
          return self.titre
  </code></pre>
  
  <p>So when I run <code>python manage.py makemigrations &lt;my_app_name&gt;</code>, I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "manage.py", line 15, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "C:\Users\lislis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django-2.0-py3.5.egg\django\core\management\__init__.py", line 354, in execute_from_command_line
      utility.execute()
    File "C:\Users\lislis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django-2.0-py3.5.egg\django\core\management\__init__.py", line 330, in execute
      django.setup()
    File "C:\Users\lislis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django-2.0-py3.5.egg\django\__init__.py", line 24, in setup
      apps.populate(settings.INSTALLED_APPS)
    File "C:\Users\lislis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django-2.0-py3.5.egg\django\apps\registry.py", line 112, in populate
      app_config.import_models()
    File "C:\Users\lislis\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django-2.0-py3.5.egg\django\apps\config.py", line 198, in import_models
      self.models_module = import_module(models_module_name)
    File "C:\Users\lislis\AppData\Local\Programs\Python\Python35-32\lib\importlib\__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 665, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed
    File "C:\Users\lislis\Django\mon_site\blog\models.py", line 6, in &lt;module&gt;
      class Article(models.Model):
    File "C:\Users\lislis\Django\mon_site\blog\models.py", line 16, in Article
      categorie = models.ForeignKey('Categorie')
  TypeError: __init__() missing 1 required positional argument: 'on_delete'
  </code></pre>
  
  <p>I've seen some similar issues in stackoverflow, but it seems to not be the same problem: <a href="https://stackoverflow.com/questions/39231476/init-missing-1-required-positional-argument-quantity">__init__() missing 1 required positional argument: &#39;quantity&#39;</a></p>