diff options
Diffstat (limited to 'tests/admin_views/forms.py')
| -rw-r--r-- | tests/admin_views/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/admin_views/forms.py b/tests/admin_views/forms.py index cceb543c41..b25e49246a 100644 --- a/tests/admin_views/forms.py +++ b/tests/admin_views/forms.py @@ -1,6 +1,6 @@ -from django import forms from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.admin.helpers import ActionForm +from django.core.exceptions import ValidationError class CustomAdminAuthenticationForm(AdminAuthenticationForm): @@ -11,7 +11,7 @@ class CustomAdminAuthenticationForm(AdminAuthenticationForm): def clean_username(self): username = self.cleaned_data.get('username') if username == 'customform': - raise forms.ValidationError('custom form error') + raise ValidationError('custom form error') return username |
