[英]Django template hyperlink don't showing up
我正在尝试在模板中创建超链接。 这是这样的:
<a {% url 'favourited' tweet.id%}>{{tweet.favourite.count }}</a>
但是,它仅呈现{{tweet.favourite.count }}
部分。
有趣的是,没有超链接,此{% url 'favourited' tweet.id%}
返回正确的链接: favourited/1
那么问题出在哪里呢?
您的意思是:
<a href="{% url 'favourited' tweet.id%}">{{tweet.favourite.count}} </a>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.