2👍
✅
You can make use of the {% url … %}
template tag [Django-doc]:
<li>
<a href="{% url 'detail' question_id=question.pk">
{{ question.question_text }}</a></li>
<button type='submit'> Result
</button>
</a>
</li>
0👍
<li><a href="/polls/{{ question.question_id }}/">{{ question.question_text }}</a></li><a href="/polls/{{ question.question_id }}/results/" title="{{ question }} Results"><button type='submit'> Result</button></a>
👤Tech
- [Django]-Http post request to a Django webservice (need login info) using Postman
- [Django]-How to update where the files are stored in Django app
- [Django]-Having an edit form and a detail view on the same page
- [Django]-Using two models in one FormWizard
Source:stackexchange.com