def __get__(self, request, obj_type=None): if not hasattr(request, '_cached_user'): from seahub.auth import get_user request._cached_user = get_user(request) return request._cached_user