You may not need to check the next variable in the template. You can try:
{% if next %}<input type="hidden" name="next" value="{{ next }}" />{% endif %}
just:
<input type="hidden" name="next" value="/added/comment/page/" />
If you use view.py, redirecting from there seems more obvious, at least for me, as it helps to keep the attention from the template:
from django.http import HttpResponseRedirect HttpResponseRedirect("/path/to/redirect")
source share