Ticket #13411: patch01.patch

File patch01.patch, 704 bytes (added by timesong, 14 years ago)
  • utils.py

     
    2525    if next is None:
    2626        next = urlresolvers.reverse(default_view)
    2727    if get_kwargs:
     28        if '#' in next:
     29            tmp = next.rsplit('#', 1)
     30            next = tmp[0]
     31            anchor = '#' + tmp[1]
     32        else:
     33            anchor = ''
     34
    2835        joiner = ('?' in next) and '&' or '?'
    29         next += joiner + urllib.urlencode(get_kwargs)
     36        next += joiner + urllib.urlencode(get_kwargs) + anchor
    3037    return HttpResponseRedirect(next)
    3138
    3239def confirmation_view(template, doc="Display a confirmation view."):
Back to Top