17👍
✅
No quote ''
<a href ={% url user_details x.id %} class='btn btn-primary' style="float: right;" >
Know More
</a>
Another your url
url(r'^User/(?P<userid>\d+)/$', 'search.views.user_detail', name='user_details'),
11👍
Be carefull, after Django 1.5, use must use quotes. I came across this solution and tried it, got an error. I’m using Django 1.6 and you need the quotes:
<a href ={% url 'user_details' x.id %} class='btn btn-primary' style="float: right;" >
Know More
</a>
hope it helps.
- Should I use google-app-engine-django or app-engine-patch or neither or something else?
- How do I correctly extend the django admin/base.html template?
- Django admin different inlines for change and add view
- Django 'dict' object has no attribute 'user_id'
- Where to place my base.html file?
Source:stackexchange.com