Error handling in the RequestHandler without embedding in URI

Posted by hyn on Stack Overflow See other posts from Stack Overflow or by hyn
Published on 2010-01-19T10:20:20Z Indexed on 2010/04/24 16:03 UTC
Read the original article Hit count: 241

Filed under:
|
|

When a user sends a filled form, I want to print an error message in case there is an input error. One of the GAE sample codes does this by embedding the error message in the URI.

Inside the form handler (get):

self.redirect('/compose?error_message=%s' % message)

and in the handler (get) of redirected URI, gets the message from request:

values = {
    'error_message': self.request.get('error_message'),
    ...

Is there a way to accomplish the same without embedding the message in the URI?

© Stack Overflow or respective owner

Related posts about python

Related posts about google-app-engine