Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[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
  • Loading branch information...
commit 409efbf57c0f1dc7772fdcabc9f7c5525affcc8d 1 parent ffd5564
@HonzaKral HonzaKral authored
View
3  django/contrib/localflavor/id/forms.py
@@ -5,8 +5,9 @@
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
View
4 django/contrib/localflavor/kw/forms.py
@@ -3,8 +3,10 @@
"""
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})')
View
3  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
View
3  django/contrib/localflavor/uy/forms.py
@@ -4,7 +4,8 @@
"""
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
View
3  django/forms/fields.py
@@ -21,6 +21,9 @@
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, \
Please sign in to comment.
Something went wrong with that request. Please try again.