2014-10-26 133 views
0

我想在我的模板中創建一個超鏈接。這是如何:Django模板超鏈接不顯示

<a {% url 'favourited' tweet.id%}>{{tweet.favourite.count }}</a> 

Howerver,它只呈現{{tweet.favourite.count }}部分。

Intrestingly,沒有超級鏈接這個{% url 'favourited' tweet.id%}返回正確的鏈接:favourited/1

那麼問題出在哪裏?

+0

不,相同的輸出 – user3767139 2014-10-26 21:02:18

回答

3

你的意思辦:

<a href="{% url 'favourited' tweet.id%}">{{tweet.favourite.count}} </a>