我安装了这两个应用后出现此错误:https://github.com/dyve/django-bootstrap3和https://github.com/django-admin-bootstrapped/django-admin-bootstrapped
django@apgavo:~/apgavo$ python manage.py collectstatic
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 89, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: bootstrap3
settings.py:
INSTALLED_APPS = (
'django_admin_bootstrapped.bootstrap3',
'django_admin_bootstrapped',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'bootstrap3',
)
无论如何要解决这个问题?或者这应该作为一个问题提交给其中一个项目?
答案 0 :(得分:12)
似乎在Django 1.7中,应用程序必须被唯一标记。这是一项新要求,因此会引发新的冲突。在您的示例中,有两个名为bootstrap3的应用程序:bootstrap3扩展名和django_admin_bootstrapped.bootstrap3扩展名 - Django似乎只是尊重程序包名称,而不是完整程序包路径。
Django 1.7有关于如何解决此问题的说明: https://docs.djangoproject.com/en/1.7/ref/applications/#for-application-authors
目前,您似乎必须等待这两个应用的开发人员发布修复程序。两个项目中都存在匹配问题:
嗯,我刚注意到这两个问题是由你提交的。 :)尽管如此,我还是留下了答案供将来参考。