Calin Paul Alexandru
Calin Paul Alexandru

Reputation: 4762

Python webapp2: redirect back

I'm using the google app engine for a basic app.

The scenario is simple: i click Logout and I want my Logout handler to redirect me back to the page from where I came from.

How do I achieve this? thnx

Upvotes: 3

Views: 1053

Answers (1)

Peter Knego
Peter Knego

Reputation: 80340

When creating logout url you can pass in the url you want user to be redirected to, in your case his current url. Something like this (I'm not Python dev, so ...):

users.create_logout_url(self.request.url)

Upvotes: 5

Related Questions