I have this in my template:
<div id="comment-{{ post_comment.id }}">
<a title="Comment was useful" href="/useful-comment/{{ blog_post.id }}/{{ post_comment.id }}/">
When the user clicks on this link, the method useful_comment(blog_post_id, post_comment_id) is called and at when it returns it loads the same template again. I then want to scroll the page down to #comment-{{ post_comment.id }}, but how do I do that if I load my template like so:
arguments = dict(user = request.user, blog_post = blog_post)
t = loader.get_template('blog-post-template.html')
c = RequestContext(request, args)
return HttpResponse(t.render(c))
This is related to Django: How do I position a page when using Django templates, but in that question they are using forms and only scrolling down to a static section of the page.