Esempio n. 1
0
def login_logout(request):
    if env.is_gae():
        return gae_login_logout(request)
    else:
        return django_login_logout(request)
Esempio n. 2
0
def current_user():
    if env.is_gae():
        from google.appengine.api import users
        return users.get_current_user()
    else:
        return None
Esempio n. 3
0
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