问题标签 [django-oscar]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1399 浏览

python - 如何翻译 django-oscar 的仪表板?

我今天安装了 django-oscar(电子商务)并面临以下问题:
看起来我只能翻译/admin部分中的模型名称,而不能翻译其他任何内容。

这就是我的配置:

我在做什么:

1)在目录中生成 django.po 文件中运行django-admin.py makemessages --locale=be2 )/home/beardy/work/fireshop/lib/python2.7/site-packages/oscar
在 django.po 中编辑翻译 3)然后我运行 4)服务器重启oscar/locale/be/LC_MESSAGES



django-admin.py compilemessages



看起来一切都按照文档完成。
尽管如此,仪表板中的任何内容都没有被翻译,只有/admin.
我究竟做错了什么?任何帮助表示赞赏。

0 投票
1 回答
1519 浏览

django-templates - Django oscar custom template file structure

I'm trying to write my custom template for django oscar. I have completly different template structure from original oscar's template. But for now it uses many default oscar views.

The problem is that template path is hardcoded in oscar's default view. I.e.

template_name = 'catalogue/browse.html'

And I need something like:

template_name = 'anotherdir/index.html'

What is the best/easiest way to override this template paths and leave default oscar views logic?

0 投票
1 回答
264 浏览

django - django-oscar 验证错误:属性不能为空

我使用来自 master 分支的最新 django-oscar。

我一直在尝试了解如何使用 oscar,请帮助我解决以下问题。

使用管理页面,首先,我添加以下产品属性

然后我尝试添加一个带有产品类的新产品Base Card。在该Product Attribute Values部分下,我选择Card Type了属性,但无论我在值选项、文本或整数下插入什么值,我都会不断收到下面的验证错误。知道为什么吗?

0 投票
0 回答
288 浏览

python - Django-oscar 演示错误无法导入配置文件模型

我下载了 django-oscar 并尝试在应用程序中运行演示。当我尝试运行演示时,我收到错误为“无法导入配置文件模型”。此演示中的 Urls.py 文件为

请建议我一些想法来纠正这个问题。提前致谢。

0 投票
2 回答
1645 浏览

django - django oscar 抽象模型定制

我想覆盖 django-oscar 地址应用程序。我需要的是删除一些 AbstractAddress 属性(apps.address.abstact_models)。根据这个文档,过程如下 - 创建具有相同名称的本地应用程序并在模型模块中发挥我的作用。不要忘记在文件末尾从默认的 abstract_models 导入 *。然后将此应用程序添加到 installed_apps 中,最后添加 schemamigration --auto 并迁移。

但是 django 没有接受更改。此外,任何覆盖 AbstractAddress 类方法的尝试都会被忽略。为什么?abstract_models 有什么特别之处吗?

0 投票
1 回答
378 浏览

django - 将 AMERICAN EXPRESS 支付源与 django-oscar 0.6 集成

我正在做一个使用 django-oscar 0.6 的电子商务网站。我必须将 AMERICAN EXPRESS 支付源与该项目集成。是否有任何现有的软件包可用,例如 django-oscar-paypal,或者我必须从头开始构建一个新应用程序。我尝试在整个互联网上搜索,但没有找到 python 和 django 的代码。

0 投票
1 回答
216 浏览

django - 强制创建相关模型

我想在 oscar 的文档之后从仪表板添加多个经销商支持:

您需要强制为每个产品创建一个 StockRecord。创建产品时,Stockrecord.partner 被设置为 self.request.user.partner(必要时创建),因此建立了连接

我不知道如何强制创建 StockRecord。oscar 有一个仪表板取代了 django 管理员,这是用于创建/更新产品的视图的摘录(第一行):

因此,产品创建视图将显示 StockRecord 表单集,但我可以在不创建 StockRecord 对象的情况下创建/更新产品。发生这种情况时,我想显示一条错误消息。

StockRecord 表格/表格集:

StockRecord 模型(摘录):

0 投票
1 回答
273 浏览

python - 如何安装不在 virtualenv 的站点包中的包并将命令放入 requirements.txt 将从本地目录安装此包的命令?

我有一些 django 包,例如django-oscar. 我需要用 pip 安装它,然后编辑代码并修改。

我试图通过安装它setup.py deploy并制作.egg-info. 然后我了解到 pip 没有通过.egg-info.

我也尝试使用从本地目录安装包-e /path/to/package,但 pip 不允许我从目录安装。它给我发信息:--editable=src/django-oscar-master/oscar/ should be formatted with svn+URL, git+URL, hg+URL or bzr+URL

然后我尝试通过pip install django-oscar --no-index --find-links=file://src/django-oscar-master/类似的命令进行安装。它总是给我发信息:Could not find any downloads that satisfy the requirement django-oscar

如何安装不在site-packagesvirtualenv中的包并放入命令requirements.txt将从本地目录安装此包?

0 投票
3 回答
1901 浏览

django - Django-oscar 产品图片错误

产品图片已正确上传到媒体文件夹,但在打开产品页面时没有被请求。产品图片的图片容器只是一个没有图片 src 的 div 此外,目录图片正在工作并且正在正确显示. 我无法弄清楚出了什么问题。请帮忙。

0 投票
1 回答
3176 浏览

python - Django-oscar 安装为新项目,项目目录中有 oscar 文件

我想在 Django 中开始一个新项目。我想使用一些来自 Github 的 django-oscar 应用程序。

Django-oscar 已经提供了一个 [pip infall django-oscar] 命令来安装它。但这一次 osacar 文件进入了 site-package 目录。我希望它们在我当前的项目目录中。有什么解决办法。