title: Django: Error with django content type
body: <p>I got error:</p>
  
  <pre><code>django.db.utils.IntegrityError: insert or update on table "auth_permission" violates foreign key constraint "auth_content_type_id_508cf46651277a81_fk_django_content_type_id"
   DETAIL:  Key (content_type_id)=(1) is not present in table "django_content_type".
  </code></pre>
  
  <p>I found <a href="https://code.djangoproject.com/ticket/10827" rel="nofollow noreferrer">this post</a> but no recommendation helps:</p>
  
  <pre><code>ContentType.objects.clear_cache()
  
  move 'django.contrib.contenttypes' before 'django.contrib.auth' in INSTALLED_APPS
  </code></pre>
  
  <p>Has anyone found a solution to this problem?</p>
  
  <p>For details: my settings.py</p>
  
  <pre><code>INSTALLED_APPS = (
      'django.contrib.contenttypes',
      'django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'django.contrib.postgres',
      'webpack_loader',
      'rest_framework',
      'corsheaders',
      'common',
      'humans',
      'validations',
      'accounts',
      'comments',
      'errors',  
      'django_nose',
      'reports',
      'dashboards',
      'cacheops',
      'djcelery',
  )
  </code></pre>