I want to pass userid from django url to my view
Here is what I wrote in the Django template
<a href ={% url 'user_details' x.id %} class='btn btn-primary' style="float: right;" >Know More</a></div>
To handle this URL, I wrote Url as
url(r'^User/(\d{userid})/$', 'search.views.user_detail',name='user_details'),
But I get an error ie
NoReverseMatch at /search/ Reverse for ''user_details'' with arguments '(2L,)' and keyword arguments '{}' not found.
Please help me. What can I do wrong here.
masterofdestiny
source share