put your check_authenticate in middleware. BTW: look my yesterday post, I want put the check func() in _loadhooks[], but I got the same problem of you
On 12/8/07, Zack <[EMAIL PROTECTED]> wrote: > > Is there a good way to end the current request instead of returning > all the way out to GET() or POST()? > > For example: > > clas secret_page(self): > def GET(self): > self.ok() > print "it seems like you're ok" > def POST(self): > self.ok() > print "it still seems like you're ok" > def ok(self): > if check_authentication(): > return > else: > pass ## exit without returning here! > > I tried doing web.seeother to send them to an error page, but it seems > like it continues to execute the rest of the code (which it probably > should in that case.) > > It seems like a pretty reasonable thing to do. Otherwise I have to add > all these bogus returns and exit handling for them. > > > -- Sent from Gmail for mobile | mobile.google.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" 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/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
