Django 2.0:应用程序标签不是唯一的,重复:auth

时间:2018-05-06 13:02:05

标签: python django django-admin django-authentication django-allauth

我尝试迁移文件后出现此错误

  

PS C:\ djangoproject \ src> python manage.py makemigrations Traceback   (最近一次呼叫最后一次):文件" manage.py",第15行,in       execute_from_command_line(sys.argv)File" C:\ Program Files \ Python36 \ lib \ site-packages \ django \ core \ management__init __。py",   第371行,在execute_from_command_line中       utility.execute()文件" C:\ Program Files \ Python36 \ lib \ site-packages \ django \ core \ management__init __。py",   第347行,执行中       django.setup()文件" C:\ Program Files \ Python36 \ lib \ site-packages \ django__init __。py",第24行,in   建立       apps.populate(settings.INSTALLED_APPS)文件" C:\ Program Files \ Python36 \ lib \ site-packages \ django \ apps \ registry.py",第93行,in   填充       "重复:%s" %app_config.label)    django.core.exceptions.ImproperlyConfigured:应用标签不是唯一的,重复:auth

请帮忙。

1 个答案:

答案 0 :(得分:5)

您还有一个'django.contrib.auth'

INSTALLED_APPS = [ 'django.contrib.admin', 
               'django.contrib.auth', 
               'django.contrib.contenttypes', 
               'django.contrib.sessions', 
               'django.contrib.messages', 
               'django.contrib.staticfiles', 
               'profiles', 
               'crispy_forms', 
               'django.contrib.auth',     --->EXTRA Remove this
               'django.contrib.sites', 
               'allauth', 
               'allauth.account'
 ]