gpt4 book ai didi

python - Django 2.0 : Application labels aren't unique, 重复:auth

转载 作者:行者123 更新时间:2023-12-03 18:32:34 30 4
gpt4 key购买 nike

尝试迁移文件后出现此错误
PS C:\djangoproject\src> python manage.py makemigrations

Traceback (most recent call last): 
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "C:\Program Files\Python36\lib\site-packages\django\core\management\__init__.py",line 371, in
execute_from_command_line utility.execute()
File "C:\Program Files\Python36\lib\site-packages\django\core\management\__init__.py",line 347, in execute
django.setup()
File "C:\Program Files\Python36\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Program Files\Python36\lib\site-packages\django\apps\registry.py", line 93, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: auth
请帮忙。

最佳答案

你有一个额外的 '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'
]

关于python - Django 2.0 : Application labels aren't unique, 重复:auth,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50200002/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com