我可以通过点击模板中的链接访问网址中的username1/edit
,但无法访问该网址。
urls.py
url(r'^(?P<slug>[-\w\d]+)/edit/$', ProfileEdit.as_view(), name='profile_edit'),
template.html
<a href="{% url 'profile:profile_edit' %}">edit</a>
我收到以下错误
反向&#39; profile_edit&#39;参数&#39;()&#39;和关键字参数&#39; {}&#39;未找到。尝试了1种模式:[&#39;(?P [ - \ w \ d] +)/ edit / $&#39;]
我得到的问题是没有将slug值发送到url。但是如何从模板中发送slug值?
答案 0 :(得分:0)
回答问题:
panGestureRecognizer