Keep POST variables while redirecting login to GAE?

in the form, I send the data to the python webapp handler (the entire Google App Engine) using an HTTP POST request. In this script, I first check if the user is logged in, and if not, I use users.create_login_url (...) to redirect the user to the login page first.

How can I make sure that after logging in, the user is not only redirected to my python script again, but the POST variables are also saved? The only way I found is to turn all the POST variables into URL parameters and add them to the URL.

Is this even possible?

+3
source share
2 answers

. gae-sessions , . memcaches . :

from gaesessions import get_current_session
session = get_current_session()
if session.is_active():
    c = session.get('counter', 0)
    session['counter'] = c + 1
    session['blah'] = 325
    del session.blah  # remove 'blah' from the session

HTML5y localStorage.

+2

POST GET , GET , , -, POST / ( ).

, , - POST , , , () ( ) . URL- (, ) .

, , , cron.

+1

All Articles