【问题标题】:Loading to trans tags in Djangocms-text-ckeditor在 Djangocms-text-ckeditor 中加载到 trans 标签
【发布时间】:2017-07-27 16:04:11
【问题描述】:

我正在使用djangocms-text-ckeditor 插件向我的页面添加文本,但遇到了一个与翻译相关的问题。

目前我在顶部添加了load i18n,但每当我使用文本插件并切换到源代码并直接键入 HTML 时,例如<h1>{% trans "My Heading" %}</h1>,它只显示`{% trans "My Heading" %}。

它按原样呈现。

任何有关如何在文本插件中使用 trans 标签并使其正确呈现的帮助将不胜感激。

【问题讨论】:

    标签: python html django django-cms


    【解决方案1】:

    这个 sn-p 可能会帮助你:render_as_template template tag

    我没有对其进行测试,您必须注意一些安全问题。

    【讨论】:

      猜你喜欢
      • 2017-04-16
      • 2013-07-05
      • 2015-01-14
      • 2014-01-31
      • 2015-10-21
      • 2012-07-01
      • 1970-01-01
      • 2014-07-13
      • 1970-01-01
      相关资源
      最近更新 更多