【发布时间】:2019-07-25 12:24:27
【问题描述】:
我正在尝试扩展 qweb 模板视图。但它不起作用。 这是我的代码。
my_module/static/src/xml/website.xml
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="website.homepage_editor_welcome_message" >
<t t-jquery=".lead" t-operation="replace">
<p class="lead second_head">Let's start designing.</p>
</t>
</t>
</templates>
这是来自website 模块的原始代码。
<div t-name="website.homepage_editor_welcome_message" class="container text-center o_homepage_editor_welcome_message">
<h2 class="mt0">Welcome to your <b>Homepage</b>!</h2>
<p class="lead">Let's start designing.</p>
<div class="o_tooltip_container">Follow all the <div class="o_tooltip bottom"/> signs to get your website ready in no time.</div>
</div>
并在__manifest__.py 中添加 XML 文件,如下所示。
'qweb': ['static/src/xml/website.xml'],
但网站没有变化。
我该怎么做?
【问题讨论】:
-
那么,预期的变化是什么?
-
@AjmalJK,我为
<p>标签添加了新类。