我想在渲染页面时将href中的查询字符串值作为参数传递。我试过:
class Room(tornado.web.RequestHandler):
def get(self):
nw=Test
self.render("Room.html",nw=nw)
我使用龙卷风框架,python脚本是:
{{1}}
但是查询字符串没有取值“Test”,它给出了“/ room?nw =”作为URL.i.e.没有价值Test.Any帮助将不胜感激。
答案 0 :(得分:1)
请尝试使用{{}},
<a href="/room?nw={{nw}}"><button type="button" class="btn btn-primary btn-xs">Add</button></a>