def get_current_user(self):
from google.appengine.api import users<EOL>if _IS_DEVELOPMENT_SERVER:<EOL><INDENT>return users.get_current_user()<EOL><DEDENT>else:<EOL><INDENT>from google.appengine.api import oauth<EOL>try:<EOL><INDENT>user = oauth.get_current_user()<EOL><DEDENT>except oauth.OAuthRequestError:<EOL><INDENT>user = users.get_current_user()<EOL><DEDENT>return user<EOL><DEDENT>
Override get_current_user for Google AppEngine
Checks for oauth capable request first, if this fails fall back to standard users API