在升級到1.7的Django我越來越從./manage.py
如何在Django 1.7中解析「django.core.exceptions.ImproperlyConfigured:應用程序標籤不唯一,重複:foo」?
$ ./manage.py
Traceback (most recent call last):
File "./manage.py", line 16, in <module>
execute_from_command_line(sys.argv)
File "/home/johnc/.virtualenvs/myproj-django1.7/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 427, in execute_from_command_line
utility.execute()
File "/home/johnc/.virtualenvs/myproj-django1.7/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 391, in execute
django.setup()
File "/home/johnc/.virtualenvs/myproj-django1.7/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/johnc/.virtualenvs/myproj-django1.7/local/lib/python2.7/site-packages/django/apps/registry.py", line 89, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: foo
什麼問題,如何解決它下面的錯誤信息?
發問者沒有接受他自己的回答,但它是正確的。一旦你這樣做了,你把'full.python.path.to.your.app.foo.apps.FooConfig'放到你的'INSTALLED_APPS'中,一切都按預期工作。 – Brett
對我不起作用 –
只是想提一提,添加標籤後,運行如下所示的遷移:python manage。py makemigrations my.foo – 82din