Jay Modi
Jay Modi

Reputation: 3331

Extending Customer's view from Django-Oscar

I am trying to override customer app in django-oscar. For that I have created customer app in my apps folder in project. While I run that project I encountered an error in django 1.7.4 as below:

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

I went through the doc in django https://docs.djangoproject.com/en/1.7/ref/applications/#django.apps.AppConfig, But its not working out. So Is there any other way to extend any django-oscar's app and modify the code as per requirements.

This is my customer app's views.py:

from oscar.apps.customer.views import ProfileView as CoreProfileView

class ProfileView(CoreProfileView):
    template_name = 'new_account.html'

and below is project's settings.py code snippet:

INSTALLED_APPS = [
    'apps.customer',
]

Thanks in advance.

Upvotes: 1

Views: 239

Answers (1)

user2842009
user2842009

Reputation:

Run this command to overide apps from django oscar

./manage.py oscar_fork_app appname yourprojectname

yourprojectname-Your folder path to where the app should be created

Once you run this command a new app will be created with overided models,admin files.now add the app path inside

get_core_apps(['yourproject.order']) in settings.py file.

For more information please refer

http://django-oscar.readthedocs.org/en/latest/topics/customisation.html

Upvotes: 4

Related Questions