Do not redirect to "thanks.html", you don't have a handler specified
in 'app' for this.

    def post(self):
            ..
            self.redirect('thanks')



2008/12/3 David Price <[EMAIL PROTECTED]>:
> If this is too basic sorry but not really working this out
>
>
>
> I would like to do a basic two page post and get. The main page main.html
> gets picked up by the code  "app = webapp.WSGIApplication([('/', MyHandler),
> "
>
> But I am expecting main to redirect to thanks and the code for NextHandler
> to be executed. But all that's happening is that MyHandler is executing.
>
> Or maybe I should ask how to you create two dynamic pages ?
>
>
>
>
>
> class MyHandler(webapp.RequestHandler):
>
>     def get(self):
>
>             …
>
>             self.response.out.write(
>
>             template.render('main.html',values))
>
>
>
>     def post(self):
>
>             ..
>
>             self.redirect('thanks.html')
>
>
>
> class NextHandler(webapp.RequestHandler):
>
>     def post(self):
>
>             …
>
>             self.response.out.write(
>
>             template.render('main.html',values))
>
>
>
>
>
> def main():
>
>      app = webapp.WSGIApplication([('/', MyHandler),
>
>                                         ('/thanks', NextHandler)],
>
>                                        debug=True)
>
> ____The information in this email is private & confidential. It is intended
> only for the use of the person(s) named. If you are not the intended
> recipient, you are notified that any dissemination or copying of this
> communication is prohibited and kindly requested to notify the sender and to
> then delete this message. BestAtTravel gives no representation or guarantee
> with respect to the integrity of any emails or attached file and the
> recipient should check the integrity of and scan this email and any attached
> files for viruses prior to opening.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to