adamchainz / django-cors-headers

Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: corsheaders

m7salam opened this issue · comments

Watching for file changes with StatReloader
INFO 2019-11-22 14:31:28,792 autoreload 31753 140671781209920 Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/mo/dev/accsellerate/code/salesminded/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/home/mo/dev/accsellerate/code/salesminded/venv/lib/python3.7/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/mo/dev/accsellerate/code/salesminded/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 77, in raise_last_exception
raise _exception[1]
File "/home/mo/dev/accsellerate/code/salesminded/venv/lib/python3.7/site-packages/django/core/management/init.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/home/mo/dev/accsellerate/code/salesminded/venv/lib/python3.7/site-packages/django/utils/autoreload.py", line 54, in wrapper
fn(*args, **kwargs)
File "/home/mo/dev/accsellerate/code/salesminded/venv/lib/python3.7/site-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/mo/dev/accsellerate/code/salesminded/venv/lib/python3.7/site-packages/django/apps/registry.py", line 95, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: corsheaders

not sure what is the problem , there , i don't have duplicate corsheaders installed

this appears when i add corsheaders to my installed apps !

any solution ?

Check all your code for INSTALLED_APPS references. You probably have a place in your code that is adding it some other way. Maybe you have multiple settings files inheriting from each other?

Check all your code for INSTALLED_APPS references. You probably have a place in your code that is adding it some other way. Maybe you have multiple settings files inheriting from each other?

yup that was correct , Iam sorry for the silly issue :-D , but it was also added in the local.py settings but now its solved

thanks 👍