[Answered ]-Django: How to define "Next" within the Comments form

2👍

Figured it out. To use the next with multiple objects, use an if statement.

{% if picture %}
<input type="hidden" name="next" value="{% url picture picture.id %}" />
{% endif %}
👤Emile

0👍

If you want to stay on the same page ajax is an option, you could use something like django_ajaxcomments, there are quite a few posts on others ways to do this with ajax.

👤JamesO

Leave a comment