Python webapp2:重定向回来

Cal*_*dru 3 python google-app-engine redirect webapp2

我正在使用谷歌应用程序引擎的基本应用程序.

场景很简单:我点击Logout,我希望我的Logout处理程序将我重定向回我来自的页面.

我该如何实现这一目标?日Thnx

Pet*_*ego 5

创建注销URL,你可以在你想用户重定向到,在你的情况下,他当前的URL链接通过.像这样的东西(我不是Python dev,所以......):

users.create_logout_url(self.request.url)
Run Code Online (Sandbox Code Playgroud)