what is the difference between "/" and self.request.get('url' '/' ) ?
is it the full address? (Yes, I will try later this evening :-)On Mar 5, 1:10 am, pedepy <[email protected]> wrote: > yes i was gonna say, keeping track of the original URL in a logout > operation is probably not important, as you most likely want to simply > redirect to home page. (this can also make the user more 'secure' that > his session has indeed been properly terminated if its important to > your app).. > > here's my way, pretty similar: > > class LogoutHandler(BaseHandler): > def get(self ): > self.redirect( users.create_logout_url( self.request.get > ( 'uri', '/' ) ) ) > > On Mar 4, 1:45 pm, OliWeiD <[email protected]> wrote: > > > > > Hi Paul, > > > after multiple trials I found a way which is working: > > 1) as link I'm using now /logout > > 2) the following handler is answering to it (typical stuff in app.yaml > > and wsgi application) > > class LogoutHelper(webapp.RequestHandler): > > def get(self): > > usr = users.get_current_user() > > if not usr: > > self.redirect("/") > > return > > # HERE I'M DOING THE CLEANUP STUFF > > url = users.create_logout_url("/") > > self.redirect(url) > > > Thanks for the hints! > > Kind Regards > > Oliver W-D > > > On 4 Mrz., 15:31, Paul Roy <[email protected]> wrote: > > > > yep well turns out this is exactly what im doing. but i dont see this > > > as "generating a blank page". i have to try out the code i suggested > > > yesterday. > > > > and i did make it home, thx :) > > > > Sent from my iPhone > > > > On 09-03-04, at 01:28, OliWeiD <[email protected]> > > > wrote: > > > > > Well, I've got the idea. > > > > > But I put the logout-uri into the html sitting on the page. > > > > With your idea in mind, don't I need a blank page, > > > > doing the del session stuff and then logout, passing the correct > > > > logout uri > > > > as an argument to that blank page?? > > > > > Now I have to go to the train, hopefully you get, where you want to > > > > go. > > > > > Oliver W.D. > > > > > On 4 Mrz., 06:26, Paul Roy <[email protected]> wrote: > > > >> perhaps, instead of using the users' method directly, create a logout > > > >> handler where you perform the necessary operations before fowarding > > > >> to > > > >> the logout uri. > > > > >> the tricky part is keeping track of the original uri. the way i do > > > >> it, > > > >> is to pass it as a request argument. you could maybe subclass the > > > >> request handler, with a logout method. such as: > > > > >> def logout(self, uri=None): > > > >> <check that there really is a user logged in > > > > >> if uri is None: uri = self.request.uri #not sure this part > > > >> works.. > > > > >> <del session and stuff..> > > > > >> self.redirect(user.logout(uri)) > > > > >> .. > > > > >> im not 100% sure about this since im just typing this on my phone > > > >> 50ft > > > >> underground in a speeding subway train with nothing to refer to, but > > > >> you should get the idea. > > > > >> when i get home ill see what code i use exactly.. ;) > > > > >> ps i actually just missed my stop! lol.. damn you google!! (shakes > > > >> fist) > > > > >> Sent from my iPhone > > > > >> On 09-03-04, at 00:01, OliWeiD <[email protected]> > > > >> wrote: > > > > >>> Hi everybody, > > > > >>> due to security reasons and for efficiency some sort of logout > > > >>> handler > > > >>> is needed. > > > >>> That means, when the user is clicking on the created logout link > > > >>> (users.create_logout_url) > > > >>> During that logout I want to delete a session cookie and delete the > > > >>> memcache entries for that user. > > > > >>> Any idea? > > > >>> Kind Regards > > > >>> Oliver W-D.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---
