diff options
| author | François Freitag <mail@franek.fr> | 2020-02-12 14:48:49 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-04-28 10:49:00 +0200 |
| commit | 9ef4a18dbe71f538a9ef8c39111ae2f0b62eb90b (patch) | |
| tree | 0016b13a357af2f642483bdd168d6f83190f33bb /tests/admin_views/forms.py | |
| parent | 2788de95e375cccd03a3dfd161fc92b7d6df6024 (diff) | |
Changed django.forms.ValidationError imports to django.core.exceptions.ValidationError.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
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 |
