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.
我做错了什么?