title: TypeError: __init__() missing 1 required positional argument: 'on_delete' in remote server CentOS7.2
body: <p>In my Mac I use PyCharm run my Django project very well.</p>
  
  <p>But in the remote server I use the same commands to run my project:</p>
  
  <pre><code>python3 manage.py runserver 8001
  </code></pre>
  
  <p>The there comes the issue: </p>
  
  <pre><code>File "/var/www/html/Qiyun02//user_admin_productmanage_cloudserver/models.py", line 3, in &lt;module&gt;
          from xxx.qiyun_admin_productconfig_cloudserver.models import (
        File "/var/www/html/Qiyun02/qiyun_admin_productconfig_cloudserver/models.py", line 109, in &lt;module&gt;
          class Disk(models.Model):
        File "/var/www/html/Qiyun02/qiyun_admin_productconfig_cloudserver/models.py", line 110, in Disk
          diskEssenceType = models.ForeignKey(to=DiskEssenceType, related_name='disks')  #  "SAS", "SSD" and so on 
      TypeError: __init__() missing 1 required positional argument: 'on_delete'
  </code></pre>
  
  <p>I know the <code>on_delete</code> error means. but I mean, in my Mac why there do not shows the error? whether this is related to django version?</p>
  
  <p>My local Mac Django version is <code>1.11.2</code>.</p>
  
  <p>The remote server CentOS7.2 version is <code>python-django-1.8.14-1.el7.noarch</code> </p>
  
  <hr>
  
  <p><strong>EDIT</strong></p>
  
  <p>Please, I know the <code>on_delete</code> error in there, I mean, in my Mac, there is no the reminds, why I copy to the CentOS7.2 remote server there comes this issue?  whether this is caused by django version?</p>
  
  <hr>
  
  <p><strong>EDIT -2</strong></p>
  
  <p>I upgrade the remote server django version to 1.11.2 too. but still have the same error.</p>
  
  <hr>
  
  <p><strong>EDIT -3</strong></p>
  
  <p>From the <a href="https://docs.djangoproject.com/en/1.11/ref/models/fields/#django.db.models.ForeignKey" rel="nofollow noreferrer">document</a>: </p>
  
  <blockquote>
    <p>A many-to-one relationship. Requires two positional arguments: the class to which the model is related and the on_delete option. (on_delete isn’t actually required, but not providing it gives a deprecation warning. It will be required in Django 2.0.)</p>
  </blockquote>
  
  <p>You know, my django version is 1.11.2 now in my CentOS7.2 remote server, why there have the issue there?</p>
  
  <hr>
  
  <p><strong>EDIT -4</strong></p>
  
  <p>I don't have a virtual environment.</p>
  
  <p>I use bellow command:</p>
  
  <pre><code>python3 manage.py shell
  </code></pre>
  
  <p>get the same issue.</p>
  
  <hr>
  
  <p><strong>EDIT -5</strong></p>
  
  <p>In the end, I find my python3 use django 2.0. this is the issue.</p>
  
  <pre><code>python3 -m django --version
  2.0
  </code></pre>