From 707d8e737069c91aa3e7463cbbb0c118f064cfdc Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:14:20 +0530 Subject: [PATCH] Added condition to hosting form to show message for account that have not yet been validated after account creation --- hosting/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosting/forms.py b/hosting/forms.py index 1c7f7e88..d9a3b985 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -24,6 +24,8 @@ class HostingUserLoginForm(forms.Form): is_auth = authenticate(email=email, password=password) if not is_auth: raise forms.ValidationError("Your username and/or password were incorrect.") + elif is_auth.validated == 0: + raise forms.ValidationError(_("Your account is not activated yet.")) return self.cleaned_data def clean_email(self):