我试图推翻django-oscar的客户应用程序。为此,我在项目中的应用程序文件夹中创建了客户应用程序。在运行该项目时,在django 1.7.4中遇到了一个错误,如下所示:
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: customer我通过了django https://docs.djangoproject.com/en/1.7/ref/applications/#django.apps.AppConfig中的文档,但是它没有起作用。那么,是否还有其他方法来扩展django-oscar的应用程序,并根据需求修改代码。
这是我的客户应用程序的views.py:
from oscar.apps.customer.views import ProfileView as CoreProfileView
class ProfileView(CoreProfileView):
template_name = 'new_account.html'下面是项目的settings.py代码片段:
INSTALLED_APPS = [
'apps.customer',
]提前谢谢。
发布于 2015-02-24 09:28:14
运行此命令以覆盖django oscar的应用程序
./manage.py oscar_fork_app appname yourprojectname您的项目名称-您的文件夹路径到应用程序应该创建的位置
运行此命令后,将创建一个新的应用程序,并使用过度化的模型,管理files.now在其中添加应用程序路径。
get_core_apps(['yourproject.order'])在settings.py文件中。
如需更多资料,请参阅
http://django-oscar.readthedocs.org/en/latest/topics/customisation.html
https://stackoverflow.com/questions/28675401
复制相似问题