mirror of https://github.com/django/django.git
Removed deprecated en_format helper function.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
eea43f2458
commit
8db51a70da
|
@ -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)()
|
||||
|
|
Loading…
Reference in New Issue