简体   繁体   English

Python Mako 模板空 output

[英]Python Mako Template empty output

Ran into this today;今天碰到这个; posting for future generations为后代张贴

If you're rendering a mako template which defines a如果你正在渲染一个定义了一个 mako 模板

<%block name="body" />

in it, and you're getting an empty string as output在其中,你得到一个空字符串 output

Odds are it's because your block is conflicting with mako's internal variables.很可能是因为您的块与 mako 的内部变量冲突。 Try renaming it to something else and rendering it again尝试将其重命名为其他名称并再次渲染

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM