Without redirection, I would set the variable in your view and pass it to your template.
gotodiv = False if somecase: gotodiv = 'pictures'
Then, in your template, you have simple javascript to go into the div.
{% if gotodiv %} <script> window.location.hash = '#{{gotodiv}}'; </script> {% endif %}
No extra views on your web server or django app.
* Edited to change location.hash.
source share