Reformat code
This commit is contained in:
parent
a6a6f8213b
commit
47b714101b
2 changed files with 5 additions and 3 deletions
|
@ -19,10 +19,12 @@ class LoginForm(forms.Form):
|
||||||
is_auth = authenticate(username=email, password=password)
|
is_auth = authenticate(username=email, password=password)
|
||||||
if not is_auth:
|
if not is_auth:
|
||||||
raise forms.ValidationError(
|
raise forms.ValidationError(
|
||||||
_("Your username and/or password were incorrect."))
|
_("Your username and/or password were incorrect.")
|
||||||
|
)
|
||||||
elif is_auth.validated == 0:
|
elif is_auth.validated == 0:
|
||||||
raise forms.ValidationError(
|
raise forms.ValidationError(
|
||||||
_("Your account is not activated yet."))
|
_("Your account is not activated yet.")
|
||||||
|
)
|
||||||
return self.cleaned_data
|
return self.cleaned_data
|
||||||
|
|
||||||
def clean_email(self):
|
def clean_email(self):
|
||||||
|
|
Loading…
Reference in a new issue