3
我在activities.views以下視圖功能:問題Django的網址模板標籤(和反向()函數)
def activity_thumbnail(request, id):
pass
我試圖讓該視圖的URL中的一個我的模板。 當我嘗試以下方法:
{% url activities.views.activity_thumbnail latest_activity.id %}
我收到以下錯誤:
Caught an exception while rendering: Reverse for '' with arguments '(449L,)' and keyword arguments '{}' not found.
我得到同樣的錯誤,當我嘗試以下方法:
{% url activities.views.activity_thumbnail request,latest_activity.id %}
當我嘗試命名參數:
{% url activities.views.activity_thumbnail id=r.latest_activity.key.id %}
我得到:
Caught an exception while rendering: Reverse for '' with arguments '()' and keyword arguments '{'id': 449L}' not found.
我做錯了什麼?