【发布时间】:2016-09-14 04:35:41
【问题描述】:
我想在我的基本模板中放一些代码块,但只放if request.route is '/page'。
我正在尝试添加一些类似的内容:
% if request.route == "/home":
<a class="pure-button" id="showWishboneAddForm">
<i class="fa fa-plus-circle"></i> Dodaj tuleję
</a>
% end
但后来我得到了错误:
NameError("name 'request' is not defined",)
我不想在所有路由中添加 request 参数
【问题讨论】: