如何在 pyjade 中包含内联内容
我的 jade 文件中有以下代码:
a(href='{{url_for("browse_problem", problem_id=problem._id)}}')
我试图评估 url_for 函数并将该值设置为 href 属性,但上面的代码不起作用。有人可以帮我改正吗?
I had the following code in my jade file:
a(href='{{url_for("browse_problem", problem_id=problem._id)}}')
I was trying to evaluate the url_for function and set the value as the href attribute, but the code above does not work. Can someone help me correct it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此错误已在 pyjade 的新版本 1.0 中修复。
一探究竟!
这个新代码与新版本完全兼容:
This bug is fixed in the new version 1.0 of pyjade.
Check it out!
This new code is totally compatible with the new version:
我自己通过更改 pyjade 中的一些代码解决了这个问题...在解析包括“class”或“id”的内容时似乎是一个错误。
I solved this problem myself by changing some code inside pyjade... Seems to be a bug when parsing content including 'class' or 'id'.