From 409efbf57c0f1dc7772fdcabc9f7c5525affcc8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Mon, 4 Jan 2010 01:06:54 +0000 Subject: [socc2009/model-validation] Fixed imports on newly added localflavors Also included an import to django.forms.fields for backwards compatibility. git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@12074 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/localflavor/id/forms.py | 3 ++- django/contrib/localflavor/kw/forms.py | 4 +++- django/contrib/localflavor/pt/forms.py | 3 ++- django/contrib/localflavor/uy/forms.py | 3 ++- django/forms/fields.py | 3 +++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/django/contrib/localflavor/id/forms.py b/django/contrib/localflavor/id/forms.py index 0d68fa32d5..834e588749 100644 --- a/django/contrib/localflavor/id/forms.py +++ b/django/contrib/localflavor/id/forms.py @@ -5,8 +5,9 @@ ID-specific Form helpers import re import time +from django.core.validators import EMPTY_VALUES from django.forms import ValidationError -from django.forms.fields import Field, Select, EMPTY_VALUES +from django.forms.fields import Field, Select from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode diff --git a/django/contrib/localflavor/kw/forms.py b/django/contrib/localflavor/kw/forms.py index 32d6cb990a..94296255d6 100644 --- a/django/contrib/localflavor/kw/forms.py +++ b/django/contrib/localflavor/kw/forms.py @@ -3,8 +3,10 @@ Kuwait-specific Form helpers """ import re from datetime import date + +from django.core.validators import EMPTY_VALUES from django.forms import ValidationError -from django.forms.fields import Field, RegexField, EMPTY_VALUES +from django.forms.fields import Field, RegexField from django.utils.translation import gettext as _ id_re = re.compile(r'^(?P\d{1})(?P\d\d)(?P\d\d)(?P
\d\d)(?P\d{4})(?P\d{1})') diff --git a/django/contrib/localflavor/pt/forms.py b/django/contrib/localflavor/pt/forms.py index 86833fc85f..1f51679c4a 100644 --- a/django/contrib/localflavor/pt/forms.py +++ b/django/contrib/localflavor/pt/forms.py @@ -2,8 +2,9 @@ PT-specific Form helpers """ +from django.core.validators import EMPTY_VALUES from django.forms import ValidationError -from django.forms.fields import Field, RegexField, Select, EMPTY_VALUES +from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re diff --git a/django/contrib/localflavor/uy/forms.py b/django/contrib/localflavor/uy/forms.py index 5b47ba1e24..3f70cf336a 100644 --- a/django/contrib/localflavor/uy/forms.py +++ b/django/contrib/localflavor/uy/forms.py @@ -4,7 +4,8 @@ UY-specific form helpers. """ import re -from django.forms.fields import Select, RegexField, EMPTY_VALUES +from django.core.validators import EMPTY_VALUES +from django.forms.fields import Select, RegexField from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from django.contrib.localflavor.uy.util import get_validation_digit diff --git a/django/forms/fields.py b/django/forms/fields.py index 1c6e20eecd..40e3d90d6a 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -21,6 +21,9 @@ from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode, smart_str from django.utils.formats import get_format +# provide this import for backwards compatibility +from django.core.validators import EMPTY_VALUES + from util import ErrorList from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, \ FileInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple, \ -- cgit v1.2.1