def login_failure(self):
        messages.error(
            self.request,
            "Unable to sign in with that email address; "
            "have you registered an account?"
            )
        return redirect(
            "{0}?{1}={2}".format(
                settings.LOGIN_URL,
                REDIRECT_FIELD_NAME,
                self.request.REQUEST.get(REDIRECT_FIELD_NAME, "/"),
                )
            )
Handle a failed login.
dataset/ETHPy150Open mozilla/moztrap/moztrap/view/users/views.py/Verify.login_failure