Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed deprecation warning nuisance introduced in r11964. Thanks to Lu…

…ke Plant for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12097 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4e89105d64bb9e04c409139a41e9c7aac263df4c 1 parent 7c3387a
Jannis Leidel authored January 05, 2010

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  django/forms/fields.py
7  django/forms/fields.py
@@ -19,6 +19,7 @@
19 19
 from django.utils.translation import ugettext_lazy as _
20 20
 from django.utils.encoding import smart_unicode, smart_str
21 21
 from django.utils.formats import get_format
  22
+from django.utils.functional import lazy
22 23
 
23 24
 from util import ErrorList, ValidationError
24 25
 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):
49 50
     )
50 51
     return getattr(formats, name)
51 52
 
52  
-DEFAULT_DATE_INPUT_FORMATS = en_format('DATE_INPUT_FORMATS')
53  
-DEFAULT_TIME_INPUT_FORMATS = en_format('TIME_INPUT_FORMATS')
54  
-DEFAULT_DATETIME_INPUT_FORMATS = en_format('DATETIME_INPUT_FORMATS')
  53
+DEFAULT_DATE_INPUT_FORMATS = lazy(lambda: en_format('DATE_INPUT_FORMATS'), tuple, list)()
  54
+DEFAULT_TIME_INPUT_FORMATS = lazy(lambda: en_format('TIME_INPUT_FORMATS'), tuple, list)()
  55
+DEFAULT_DATETIME_INPUT_FORMATS = lazy(lambda: en_format('DATETIME_INPUT_FORMATS'), tuple, list)()
55 56
 
56 57
 class Field(object):
57 58
     widget = TextInput # Default widget to use when rendering this type of Field.

0 notes on commit 4e89105

Please sign in to comment.
Something went wrong with that request. Please try again.