django oscar 核心应用程序与我的本地应用程序冲突
django oscar core apps confilicts with my local apps
我一直在电子商务网站上工作。我为此使用 django-oscar 1.1。这是我安装的应用程序:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# local apps
'content',
'usermgmt',
'resources',
'assessment',
'analytics',
'utils',
# 'notify',
# Auth related apps
'oauth2_provider',
'social.apps.django_app.default',
'rest_framework_social_oauth2',
# rest
'rest_framework',
'djoser',
# misc - third party
'reversion',
'corsheaders',
'notifications',
#oscar
'oscarapi',
] + get_core_apps()
同时 运行 服务器:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/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: analytics
显然分析与 get_core_apps() 中的分析相冲突。
有什么办法可以解决吗?
您必须将要覆盖的应用列表传递给
+ get_core_apps(['analytics','app2'...])
我一直在电子商务网站上工作。我为此使用 django-oscar 1.1。这是我安装的应用程序:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# local apps
'content',
'usermgmt',
'resources',
'assessment',
'analytics',
'utils',
# 'notify',
# Auth related apps
'oauth2_provider',
'social.apps.django_app.default',
'rest_framework_social_oauth2',
# rest
'rest_framework',
'djoser',
# misc - third party
'reversion',
'corsheaders',
'notifications',
#oscar
'oscarapi',
] + get_core_apps()
同时 运行 服务器:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/rss-20/.virtualenvs/kishan_pal/local/lib/python3.4/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: analytics
显然分析与 get_core_apps() 中的分析相冲突。
有什么办法可以解决吗?
您必须将要覆盖的应用列表传递给
+ get_core_apps(['analytics','app2'...])