pythongoogle-app-enginepython-2.7wsgiwebapp2

How to make a redirect and keep the query string?


I want to make a redirect and keep what is the query string. Something like self.redirect plus the query parameters that was sent. Is that possible?


Solution

  • newurl = '/my/new/route?' + urllib.urlencode(self.request.params)
    self.redirect(newurl)