使用自定义模板覆盖默认 Satchmo 电子邮件

发布于 2024-10-19 00:17:23 字数 326 浏览 6 评论 0原文

我正在使用 Satchmo 作为网站的商店部分。我正在尝试用我自己的电子邮件覆盖默认的“order_complete”电子邮件,但到目前为止还无法做到。 docs 表明它应该以与覆盖任何其他模板相同的方式完成。因此,我在 shop/email/order_complete.html 的模板文件夹中创建了一个,但它没有被选取。有人有什么想法吗?

I'm using Satchmo for the shop section of a website. I'm trying to override the default 'order_complete' email with my own, but haven't been able to so far. The docs indicate that it should be done in the same way as overriding any other template. So I've created one in my template folder at shop/email/order_complete.html, but it isn't being picked up. Anyone have any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请帮我爱他 2024-10-26 00:17:23

只是猜测,Satchmo 是否在安装的应用程序中列在您自己的应用程序之前? (如果是这样,则 order_complete 模板可能会在到达您的模板之前进行匹配。)

尝试将您的应用程序移至 Satchmo 之前,看看是否可以解决问题。

Just a guess but, is Satchmo listed in installed_apps before your own app? (If so the order_complete template may be being matched before yours is ever reached.)

Try moving your app before Satchmo and see if that solves it.

心舞飞扬 2024-10-26 00:17:23

如果您希望模板文件夹优先于应用模板文件夹,则必须在 app_directories 加载器之前设置 'django.template.loaders.filesystem.load_template_source',

If you want your template folder to take precedence over the app template folders, you have to set your 'django.template.loaders.filesystem.load_template_source', before the app_directories loader.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文