def is_admin_logined(): if is_logined(): user = get_logined_user() if user.is_superuser: return True return False
def __get__(self, obj, objtype): from account.auth import get_logined_user return get_logined_user()