Wednesday, August 26, 2015

Re: Django oscar core apps confilicts with my local apps

You can override the oscar analytics app by forking it:

https://django-oscar.readthedocs.org/en/releases-1.1/topics/fork_app.html

and then change it the way you want. You should pass a list with overridden apps to the get_core_apps function:

INSTALLED_APPS = [
    'all.apps.except.analytics',
] + get_core_apps([
    'path.to.own.analytics',
])



On Tuesday, August 25, 2015 at 9:12:15 AM UTC+2, Kishan Mehta wrote:

I have been working on a e commerce website. I am using django-oscar 1.1 for this. Here is my installed app looks like :

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()



While running server :


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


Aparently analystics is conflicting with the analytics in get_core_apps().


Is there any way to resolve this ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/07dd4264-f07e-4da9-9ce4-2249697df215%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment