def login_logout(request): if env.is_gae(): return gae_login_logout(request) else: return django_login_logout(request)
def current_user(): if env.is_gae(): from google.appengine.api import users return users.get_current_user() else: return None
def user_is_admin(): if env.is_gae(): from google.appengine.api import users return users.is_current_user_admin() else: return True # dev user is always admin