0

I have a view that ends with the following line:

#...
item = get_an_item_from_the_db()
return redirect(item)

This should return an HttpResponseRedirect that redirects the client to the following page:

/item/12/

However, I would like to append a hash to the end of the URL:

/item/12/#bottom

Is there an easy way of accomplishing this?

Charles
  • 50,943
  • 13
  • 104
  • 142
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361

1 Answers1

2

Try this:

return redirect(item.get_absolute_url() + '#hash')
ndpu
  • 22,225
  • 6
  • 54
  • 69