On Feb 23, 8:30 am, thebrianschott <schott.br...@gmail.com> wrote:
> I must be using self.redirect() when something else should be used.
> When I use self.redirect() my python program stops even though I am
> trying to redirect back into my python program.

I think you are confused about what redirect() does. When a client
(browser) sends a request to a server, the server responds with a
status code (usually 200 OK, but sometimes 404 Page not found) as well
as the page content. Appengine does all this for you without you
having to worry about it. But it can also send a 30x status code
meaning "This resource can now be found at...", including a new URL
instead of the page content, which makes the browser send another
request to the new URL.

self.redirect() does this for you, so of course processing stops -
there is no point in creating any more content after this is sent.
What you will see, assuming the browser is working correctly, is
another request from the same client for the new URL. This is serviced
by a new request handler, which might well be on another machine than
the one that did the redirect.

You will need to use a cookies/session to pass data from the original
request handler to the new one. See http://code.google.com/p/gmemsess/
for an example.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to