Fixed deprecation warning nuisance introduced in r11964. Thanks to Luke Plant for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel 2010-01-05 02:39:02 +00:00
parent 7c3387ae3a
commit 4e89105d64
1 changed files with 4 additions and 3 deletions

View File

@ -19,6 +19,7 @@ import django.utils.copycompat as copy
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode, smart_str from django.utils.encoding import smart_unicode, smart_str
from django.utils.formats import get_format from django.utils.formats import get_format
from django.utils.functional import lazy
from util import ErrorList, ValidationError from util import ErrorList, ValidationError
from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, FileInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple, DateInput, DateTimeInput, TimeInput, SplitDateTimeWidget, SplitHiddenDateTimeWidget from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, FileInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple, DateInput, DateTimeInput, TimeInput, SplitDateTimeWidget, SplitHiddenDateTimeWidget
@ -49,9 +50,9 @@ def en_format(name):
) )
return getattr(formats, name) return getattr(formats, name)
DEFAULT_DATE_INPUT_FORMATS = en_format('DATE_INPUT_FORMATS') DEFAULT_DATE_INPUT_FORMATS = lazy(lambda: en_format('DATE_INPUT_FORMATS'), tuple, list)()
DEFAULT_TIME_INPUT_FORMATS = en_format('TIME_INPUT_FORMATS') DEFAULT_TIME_INPUT_FORMATS = lazy(lambda: en_format('TIME_INPUT_FORMATS'), tuple, list)()
DEFAULT_DATETIME_INPUT_FORMATS = en_format('DATETIME_INPUT_FORMATS') DEFAULT_DATETIME_INPUT_FORMATS = lazy(lambda: en_format('DATETIME_INPUT_FORMATS'), tuple, list)()
class Field(object): class Field(object):
widget = TextInput # Default widget to use when rendering this type of Field. widget = TextInput # Default widget to use when rendering this type of Field.