I am able to access username1/editin the URL but not able to do so by clicking a link in the template.
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>
i get the following error
Reverse for 'profile_edit' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: ['(?P[-\w\d]+)/edit/$']
i get the problem is not sending the slug value to the url. but how to send the slug value from a template?
Answer for the question:
<a href="{% url 'profile:profile_edit' slug=profile.slug %}">Edit</a>