Django:应用程序标签不是唯一的,重复:bootstrap3 [英] Django: Application labels aren't unique, duplicates: bootstrap3

查看:524
本文介绍了Django:应用程序标签不是唯一的,重复:bootstrap3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了这两个应用程序后出现此错误: https://github.com/dyve/django- bootstrap3 https://github.com/django-admin-bootstrapped/django-admin-引导

I've got this error after I've installed these two apps: https://github.com/dyve/django-bootstrap3 and 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

设置。 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',
)

有没有办法解决这个问题?或者应该提交给其中一个项目作为问题?

Is there's anyway to fix this? Or this should be submitted to one of the projects as an issue?

推荐答案

似乎是在Django 1.7中,应用程序被标记为唯一的。这是一个新的要求,导致新的冲突。在您的示例中,有两个名为bootstrap3的应用程序:bootstrap3扩展名和django_admin_bootstrapped.bootstrap3扩展名 - Django只是表示符合包名,而不是完整的包路径。

It appears to be that in Django 1.7, applications have to be labeled uniquely. This is a new requirement and causes therefore new conflicts. In your example, there are two apps named bootstrap3: the bootstrap3 extension and the django_admin_bootstrapped.bootstrap3 extension -- Django only seems to honor the package name, rather than the full package path.

Django 1.7有关于如何解决这个问题的说明:
https://docs.djangoproject.com/en/1.7/ref/applications/#for-application-authors

Django 1.7 has instructions on how to solve this problem here: https://docs.djangoproject.com/en/1.7/ref/applications/#for-application-authors

现在,似乎你必须等待这两个应用程序的开发人员发布修复。两个项目中都存在匹配问题:

For now, it seems that you have to wait for the developers of those two apps to release a fix. There already exist matching issues in both projects:

  • https://github.com/dyve/django-bootstrap3/issues/165
  • https://github.com/django-admin-bootstrapped/django-admin-bootstrapped/issues/124

嗯,我刚刚注意到这两个问题是由你提交的。 :)然而,我会留下答案供将来参考。

Well, I just noticed that those two issues were submitted by you. :) Nevertheless, I'll leave the answer for future reference.

这篇关于Django:应用程序标签不是唯一的,重复:bootstrap3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆