Commit 8db51a70 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Removed deprecated en_format helper function.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent eea43f24
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -43,16 +43,6 @@ __all__ = (
    'TypedChoiceField', 'TypedMultipleChoiceField'
)

def en_format(name):
    """
    Helper function to stay backward compatible.
    """
    from django.conf.locale.en import formats
    warnings.warn(
        "`django.forms.fields.DEFAULT_%s` is deprecated; use `django.utils.formats.get_format('%s')` instead." % (name, name),
        DeprecationWarning
    )
    return getattr(formats, name)

DEFAULT_DATE_INPUT_FORMATS = lazy(lambda: en_format('DATE_INPUT_FORMATS'), tuple, list)()
DEFAULT_TIME_INPUT_FORMATS = lazy(lambda: en_format('TIME_INPUT_FORMATS'), tuple, list)()