X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/eec2d70e2fac187e43d611fc13de01a7f4bdddf9..bf7348280872f3e17f6cb766f27d57c41d9e2ae0:/contrib/waldo/forms.py diff --git a/contrib/waldo/forms.py b/contrib/waldo/forms.py index de3349a..2ee64d0 100644 --- a/contrib/waldo/forms.py +++ b/contrib/waldo/forms.py @@ -72,8 +72,8 @@ class WaldoAuthenticationForm(AuthenticationForm): ERROR_MESSAGE = _("Please enter a correct username and password. Note that both fields are case-sensitive.") def clean(self): - username = self.cleaned_data['username'] - password = self.cleaned_data['password'] + username = self.cleaned_data.get('username') + password = self.cleaned_data.get('password') message = self.ERROR_MESSAGE if username and password: @@ -96,7 +96,7 @@ class WaldoAuthenticationForm(AuthenticationForm): def check_for_test_cookie(self): # This method duplicates the Django 1.3 AuthenticationForm method. - if self.request and not self.request.session.test_cookie_worked(): - raise forms.ValidationError( - _("Your Web browser doesn't appear to have cookies enabled. " - "Cookies are required for logging in.")) \ No newline at end of file + if self.request and not self.request.session.test_cookie_worked(): + raise forms.ValidationError( + _("Your Web browser doesn't appear to have cookies enabled. " + "Cookies are required for logging in.")) \ No newline at end of file