Reformat code

This commit is contained in:
PCoder 2019-02-19 23:39:47 +01:00
parent a6a6f8213b
commit 47b714101b
2 changed files with 5 additions and 3 deletions

View file

@ -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):

View file

@ -17,4 +17,4 @@ urlpatterns = [
path('reset/<str:user>/<str:token>/', ResetRequest.as_view()), path('reset/<str:user>/<str:token>/', ResetRequest.as_view()),
path('reset/', ResetRequest.as_view(), name="reset"), path('reset/', ResetRequest.as_view(), name="reset"),
path('', Index.as_view(), name="index"), path('', Index.as_view(), name="index"),
] ]