mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
[4.0.x] Refs #33476 -- Used vertical hanging indentation for format lists with inline comments.
Lists with multiple values and comments per-line are reformatted
by Black to multiple lines with a single comment. For example:
DATE_INPUT_FORMATS =
"%Y-%m-%d", "%m/%d/%Y", "%m/%d/%y", # '2006-10-25', '10/25/2006', '10/25/06'
]
is reformatted to the:
DATE_INPUT_FORMATS =
"%Y-%m-%d",
"%m/%d/%Y",
"%m/%d/%y", # '2006-10-25', '10/25/2006', '10/25/06'
]
This reformats affected entries to multiple lines with corresponding
comments.
Backport of ca88caa103
from main
This commit is contained in:
parent
1c74ac8648
commit
0c06819caa
38 changed files with 273 additions and 134 deletions
|
@ -1111,11 +1111,17 @@ See also :setting:`DATETIME_FORMAT`, :setting:`TIME_FORMAT` and :setting:`SHORT_
|
|||
Default::
|
||||
|
||||
[
|
||||
'%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'
|
||||
'%Y-%m-%d', # '2006-10-25'
|
||||
'%m/%d/%Y', # '10/25/2006'
|
||||
'%m/%d/%y', # '10/25/06'
|
||||
'%b %d %Y', # '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'
|
||||
]
|
||||
|
||||
A list of formats that will be accepted when inputting data on a date field.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue