0
我需要从视图通过在Django模板使用应答器来查看,所以我有一本字典包含我的论点 这个我在模板中使用的代码如何在django模板中的字典中获取参数?
{% for item in data % }
{% for key, value in item.items %}
{% if key == '13' %}<a href="{% url hisaccount value %}">{% endif %}<p>go to view</p></a>
{% endfor %}
{% endfor %}
,但我得到这个错误:
NoReverseMatch at /filter/
Reverse for '' with arguments '(1,)' and keyword arguments '{}' not found.
有什么建议吗?
在'urls.py'如何定义'hisaccount'?如果是django 1.5,您可能需要执行''hisaccount'' – karthikr
url(r'^ hisaccount /(?P [ - \ w] +)/ $','Our_MarketPlace.views.his_account',name =' hisaccount'), –
imoum
哪个版本的django? – karthikr