summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHonza Král <honza.kral@gmail.com>2010-01-04 01:06:54 +0000
committerHonza Král <honza.kral@gmail.com>2010-01-04 01:06:54 +0000
commit409efbf57c0f1dc7772fdcabc9f7c5525affcc8d (patch)
tree15194166c7e9e319fc12a724e75e59da85fcde2e
parentffd5564a87c5c8e5d5e1e201ae3462807b955efc (diff)
downloaddjango-409efbf57c0f1dc7772fdcabc9f7c5525affcc8d.tar.gz
[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
-rw-r--r--django/contrib/localflavor/id/forms.py3
-rw-r--r--django/contrib/localflavor/kw/forms.py4
-rw-r--r--django/contrib/localflavor/pt/forms.py3
-rw-r--r--django/contrib/localflavor/uy/forms.py3
-rw-r--r--django/forms/fields.py3
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<initial>\d{1})(?P<yy>\d\d)(?P<mm>\d\d)(?P<dd>\d\d)(?P<mid>\d{4})(?P<checksum>\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, \