App Engine If Elif Else Working On Dev But Not Production
When I run the following code user = users.get_current_user() if users.is_current_user_admin(): loggedin = 'Admin' elif user: loggedin = 'User' else: loggedin = 'Anonym
Solution 1:
The problem has nothing to do with if/elif/else or users.create_login_url(). The issue is with App Engine not recognizing a logged in user on a http request when the user logged in with HTTPS with users.create_login_url(). I've created a new question on this here. I believe it has something to do with how the cookie is being set.
The reason the code was working on Dev and not production is how the development environment handles HTTPS urls it remaps it to http and serves the request avoiding the problem.
Post a Comment for "App Engine If Elif Else Working On Dev But Not Production"