|
|
|
|
@ -130,6 +130,7 @@ class RegistrationFormNoFreeEmail(RegistrationForm): |
|
|
|
|
|
|
|
|
|
from django.contrib.auth import authenticate |
|
|
|
|
class LoginForm(AuthenticationForm): |
|
|
|
|
inactive = False |
|
|
|
|
def clean(self): |
|
|
|
|
username = self.cleaned_data.get('username') |
|
|
|
|
password = self.cleaned_data.get('password') |
|
|
|
|
@ -147,7 +148,7 @@ class LoginForm(AuthenticationForm): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif not self.user_cache.is_active: |
|
|
|
|
self._errors['username'] = ErrorList(self.error_messages['inactive']) |
|
|
|
|
self._errors['username'] = ErrorList([self.error_messages['inactive']]) |
|
|
|
|
self.inactive = True |
|
|
|
|
|
|
|
|
|
del data['username'] |
|
|
|
|
|