From 31151c7b017c8ab4c5333f3be7c7e01ac7f1cfc3 Mon Sep 17 00:00:00 2001 From: David Lindsey Date: Sat, 7 Jul 2012 18:06:28 +0530 Subject: [PATCH 1/2] Remove DateField input formats that are no longer in the defaults. --- docs/ref/forms/fields.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 486d49d796555..4d3f7e8919164 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -399,10 +399,6 @@ For each field, we describe the default widget used if you don't specify If no ``input_formats`` argument is provided, the default input formats are:: '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06' - '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' - '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006' - '%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006' - '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006' ``DateTimeField`` ~~~~~~~~~~~~~~~~~ From 2bb312c65684f6a94ca5502f124b667653baf9f3 Mon Sep 17 00:00:00 2001 From: Dan Loewenherz Date: Fri, 7 Sep 2012 12:55:23 -0400 Subject: [PATCH 2/2] specify default input formats with USE_L10N=False, closes #18490 --- docs/ref/forms/fields.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 1b195ba27551a..21b79287e21c3 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -398,7 +398,22 @@ For each field, we describe the default widget used if you don't specify If no ``input_formats`` argument is provided, the default input formats are:: - '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06' + '%Y-%m-%d', # '2006-10-25' + '%m/%d/%Y', # '10/25/2006' + '%m/%d/%y', # '10/25/06' + + Additionally, if you specify ``USE_L10N = False`` in your settings, the + following will also be included in the default input formats:: + + '%b %m %d', # 'Oct 25 2006' + '%b %d, %Y', # 'Oct 25, 2006' + '%d %b %Y', # '25 Oct 2006' + '%d %b, %Y', # '25 Oct, 2006' + '%B %d %Y', # 'October 25 2006' + '%B %d, %Y', # 'October 25, 2006' + '%d %B %Y', # '25 October 2006' + '%d %B, %Y', # '25 October, 2006' + ``DateTimeField`` ~~~~~~~~~~~~~~~~~