9

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

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',
)

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

holms
  • 9,112
  • 14
  • 65
  • 95
  • This might help http://stackoverflow.com/questions/24319558/how-to-resolve-django-core-exceptions-improperlyconfigured-application-labels – fragles Aug 20 '14 at 06:45

1 Answers1

13

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 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:

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

arnuschky
  • 2,159
  • 1
  • 19
  • 15