def METHOD_NAME(self):
    try:
        # noinspection PyUnresolvedReferences
        return self.request.user.domains.get(name=self.kwargs["name"])
    except models.Domain.DoesNotExist:
        raise Http404