def METHOD_NAME(self, request):
    form = self.get_form()
    if form.is_valid():
        try:
            return self.perform_openid_auth(form)
        except (UnicodeDecodeError, DiscoveryFailure) as e:
            form._errors["openid"] = form.error_class([e])
    return render(request, self.template_name, {"form": form})