prefix
stringlengths
512
512
suffix
stringlengths
256
256
middle
stringlengths
14
229
meta
dict
ngs use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j F Y, H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F" SHORT_DATE_FORMAT = "d.m.Y" SHORT_DATETIME_FORMAT = "d.m.Y, H:i" FIRST_DAY_OF_WEEK =...
TIME_INPUT_FORMATS = [ "%H:%M", "%H:%M:%S", "%H:%M:%S.%f", ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y, %H:%M", "%d.%m.%Y, %H:%M:%S", "%d.%B.%Y, %H:%M", "%d.%B.%Y, %H:%M:%S", ] DECIMAL_SEPARATOR = "," THOUSAND_SEPARATOR = "." NUMBER
"%d.%b.%Y", "%d %B %Y", "%A, %d %B %Y", ]
{ "filepath": "django/conf/locale/ro/formats.py", "language": "python", "file_size": 928, "cut_index": 606, "middle_length": 52 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F" SHO...
S = [ "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M", # '2006-10-25 14:30' "%m/%d/%Y %H:%M:%S", # '10/25/2006 14:30:59' "%m/%d/%Y %H:%M:%S.%f", # '10/25/2006 14:
atetime.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%m/%d/%Y", # '10/25/2006' "%m/%d/%y", # '10/25/06' ] DATETIME_INPUT_FORMAT
{ "filepath": "django/conf/locale/sv/formats.py", "language": "python", "file_size": 1311, "cut_index": 524, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. E Y" TIME_FORMAT = "G:i" DATETIME_FORMAT = "j. E Y G:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j. F" SHORT_DATE_FO...
6' # "%d. %b. %Y", # '25. Oct. 2006' ] # Kept ISO formats as one is in first position TIME_INPUT_FORMATS = [ "%H:%M:%S", # '04:30:59' "%H.%M", # '04.30' "%H:%M", # '04:30' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '05.01.
atetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '05.01.2006' "%d.%m.%y", # '05.01.06' "%d. %m. %Y", # '5. 1. 2006' "%d. %m. %y", # '5. 1. 06' # "%d. %B %Y", # '25. October 200
{ "filepath": "django/conf/locale/cs/formats.py", "language": "python", "file_size": 1539, "cut_index": 537, "middle_length": 229 }
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "Y. F j." TIME_FORMAT = "H:i" DATETIME_FORMAT = "Y. F j. H:i" YEAR_MONTH_FORMAT = "Y. F" MONTH_DAY_F...
S = [ "%Y.%m.%d. %H:%M:%S", # '2006.10.25. 14:30:59' "%Y.%m.%d. %H:%M:%S.%f", # '2006.10.25. 14:30:59.000200' "%Y.%m.%d. %H:%M", # '2006.10.25. 14:30' ] DECIMAL_SEPARATOR = "," THOUSAND_SEPARATOR = " " # Non-breaking space NUMBER_GROUPING =
ps://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%Y.%m.%d.", # '2006.10.25.' ] TIME_INPUT_FORMATS = [ "%H:%M:%S", # '14:30:59' "%H:%M", # '14:30' ] DATETIME_INPUT_FORMAT
{ "filepath": "django/conf/locale/hu/formats.py", "language": "python", "file_size": 1001, "cut_index": 512, "middle_length": 229 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. E Y" TIME_FORMAT = "G.i" DATETIME_FORMAT = r"j. E Y \k\e\l\l\o G.i" YEAR_MONTH_FORMAT = "F Y" MONTH_DA...
9' "%d.%m.%Y %H.%M.%S.%f", # '20.3.2014 14.30.59.000200' "%d.%m.%Y %H.%M", # '20.3.2014 14.30' "%d.%m.%y %H.%M.%S", # '20.3.14 14.30.59' "%d.%m.%y %H.%M.%S.%f", # '20.3.14 14.30.59.000200' "%d.%m.%y %H.%M", # '20.3.14 14.30' ] TIME
tps://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '20.3.2014' "%d.%m.%y", # '20.3.14' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H.%M.%S", # '20.3.2014 14.30.5
{ "filepath": "django/conf/locale/fi/formats.py", "language": "python", "file_size": 1213, "cut_index": 518, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "d F Y" # 25 Ottobre 2006 TIME_FORMAT = "H:i" # 14:30 DATETIME_FORMAT = "l d F Y H:i" # Mercoledì 25 Ottobre 2006 14:30 YE...
%m/%d", # '2006/10/25' "%d-%m-%Y", # '25-10-2006' "%Y-%m-%d", # '2006-10-25' "%d-%m-%y", # '25-10-06' "%d/%m/%y", # '25/10/06' ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S.%f",
EK = 1 # Lunedì # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # '25/10/2006' "%Y/
{ "filepath": "django/conf/locale/it/formats.py", "language": "python", "file_size": 1774, "cut_index": 537, "middle_length": 229 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j ...
[ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:
on.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' "%d/%m/%Y", # '25/10/2006' "%d/%m/%y", # '25/10/06' ] DATETIME_INPUT_FORMATS =
{ "filepath": "django/conf/locale/fr_BE/formats.py", "language": "python", "file_size": 1154, "cut_index": 518, "middle_length": 229 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j E Y ж." TIME_FORMAT = "G:i" DATETIME_FORMAT = "j E Y ж. G:i" YEAR_MONTH_FORMAT = "F Y ж." MONTH_DAY_FOR...
14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200'
e https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006
{ "filepath": "django/conf/locale/ky/formats.py", "language": "python", "file_size": 1178, "cut_index": 518, "middle_length": 229 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j M Y" # '25 Oct 2006' TIME_FORMAT = "H:i" # '14:30' DATETIME_FORMAT = "j M Y, H:i" # '25 Oct 2006, 14:30' Y...
"%d/%m/%y", # '25/10/06' "%d %b %Y", # '25 Oct 2006' "%d %b, %Y", # '25 Oct, 2006' "%d %B %Y", # '25 October 2006' "%d %B, %Y", # '25 October, 2006' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59'
DAY_OF_WEEK = 1 # Monday # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # '25/10/2006'
{ "filepath": "django/conf/locale/en_IE/formats.py", "language": "python", "file_size": 1484, "cut_index": 524, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "l, j F, Y" TIME_FORMAT = "h:i a" DATETIME_FORMAT = "j F, Y h:i a" YEAR_MONTH_FORMAT = "F, Y" MONTH_DAY_FORMAT = "j F" SHORT_...
, # '25.10.2006' "%d.%m.%y", # '25.10.06' # "%d %b %Y", # '25 Oct 2006' # "%d %b, %Y", # '25 Oct, 2006' # "%d %b. %Y", # '25 Oct. 2006' # "%d %B %Y", # '25 October 2006' # "%d %B, %Y", # '25 October, 2006' ] DATETIME_INPUT_FO
library/datetime.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%m/%d/%Y", # '10/25/2006' "%m/%d/%y", # '10/25/06' "%d.%m.%Y"
{ "filepath": "django/conf/locale/ka/formats.py", "language": "python", "file_size": 1861, "cut_index": 537, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"Y \m. E j \d." TIME_FORMAT = "H:i" DATETIME_FORMAT = r"Y \m. E j \d., H:i" YEAR_MONTH_FORMAT = r"Y \m. F" MONTH_DAY_FORMAT ...
4:30:59' "%H:%M:%S.%f", # '14:30:59.000200' "%H:%M", # '14:30' "%H.%M.%S", # '14.30.59' "%H.%M.%S.%f", # '14.30.59.000200' "%H.%M", # '14.30' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59' "%Y-%m
/docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' ] TIME_INPUT_FORMATS = [ "%H:%M:%S", # '1
{ "filepath": "django/conf/locale/lt/formats.py", "language": "python", "file_size": 1637, "cut_index": 537, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. E Y." TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. E Y. H:i" YEAR_MONTH_FORMAT = "F Y." MONTH_DAY_FORMAT = "j. F" SHORT_DATE...
5. 10. 2006.' "%d. %m. %y.", # '25. 10. 06.' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M", # '2006-10-25 14:30' "%d.%m.%Y. %H:%M:%S
me.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%d.%m.%Y.", # '25.10.2006.' "%d.%m.%y.", # '25.10.06.' "%d. %m. %Y.", # '2
{ "filepath": "django/conf/locale/hr/formats.py", "language": "python", "file_size": 1723, "cut_index": 537, "middle_length": 229 }
the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" # '20 januari 2009' TIME_FORMAT = "H:i" # '15:23' DATETIME_FORMAT = "j F Y H:i" # '20 januari 2009 15:23' YEAR_MONTH_FORMAT = "F Y" # 'januari 2009' MONTH_DAY_FORMAT = "j F" # '20 januari' ...
"%d/%m/%y", # '20/01/09' "%Y/%m/%d", # '2009/01/20' # "%d %b %Y", # '20 jan 2009' # "%d %b %y", # '20 jan 09' # "%d %B %Y", # '20 januari 2009' # "%d %B %y", # '20 januari 09' ] # Kept ISO formats as one is in first position TIM
Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d-%m-%Y", # '20-01-2009' "%d-%m-%y", # '20-01-09' "%d/%m/%Y", # '20/01/2009'
{ "filepath": "django/conf/locale/nl/formats.py", "language": "python", "file_size": 3927, "cut_index": 614, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "N j, Y" TIME_FORMAT = "P" DATETIME_FORMAT = "N j, Y, P" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "F j" SHORT_DATE_FORMAT...
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' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", #
ftime-strptime-behavior DATE_INPUT_FORMATS = [ "%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", # '
{ "filepath": "django/conf/locale/ht/formats.py", "language": "python", "file_size": 1645, "cut_index": 537, "middle_length": 229 }
This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y" TIME_FORMAT = "G:i" DATETIME_FORMAT = "j. F Y G:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMA...
. %b. %Y", # '25. Oct. 2006' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' ] DECIMAL_SEPARATOR = "," THOUSAND_SEPARATO
ocs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' "%y-%m-%d", # '06-10-25' # "%d. %B %Y", # '25. October 2006' # "%d
{ "filepath": "django/conf/locale/sk/formats.py", "language": "python", "file_size": 1051, "cut_index": 513, "middle_length": 229 }
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "d F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "d F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT...
%Y", # '25 Eki. 2006' ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M", # '25/10/2006 14:30' ] DECIMAL_SEPARATOR = "," THOUSAND_SEPARATOR = ".
docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # '25/10/2006' "%d/%m/%y", # '25/10/06' "%y-%m-%d", # '06-10-25' # "%d %B %Y", # '25 Ekim 2006' # "%d %b.
{ "filepath": "django/conf/locale/tr/formats.py", "language": "python", "file_size": 1019, "cut_index": 512, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j M Y" # '25 Oct 2006' TIME_FORMAT = "P" # '2:30 p.m.' DATETIME_FORMAT = "j M Y, P" # '25 Oct 2006, 2:30 p.m.' YEAR_MONTH...
d/%m/%y", # '25/10/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' # "%
WEEK = 1 # Monday # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # '25/10/2006' "%
{ "filepath": "django/conf/locale/en_GB/formats.py", "language": "python", "file_size": 1650, "cut_index": 537, "middle_length": 229 }
This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" TIME_FORMAT = "G:i" DATETIME_FORMAT = "j F Y, G:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT...
30:59 "%H:%M:%S.%f", # 14:30:59.000200 "%H:%M", # 14:30 ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", # 25/10/2006 14:30:59 "%d/%m/%Y %H:%M:%S.%f", # 25/10/2006 14:30:59.000200 "%d/%m/%Y %H:%M", # 25/10/2006 14:30 ] DECIMAL_SEP
cs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # 25/10/2006 "%d %b %Y", # 25 ต.ค. 2006 "%d %B %Y", # 25 ตุลาคม 2006 ] TIME_INPUT_FORMATS = [ "%H:%M:%S", # 14:
{ "filepath": "django/conf/locale/th/formats.py", "language": "python", "file_size": 1072, "cut_index": 513, "middle_length": 229 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F" SHO...
"%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000
/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' "%d/%m/%Y", # '25/10/2006' "%d/%m/%y", # '25/10/06' ] DATETIME_INPUT_FORMATS = [
{ "filepath": "django/conf/locale/fr_CH/formats.py", "language": "python", "file_size": 1320, "cut_index": 524, "middle_length": 229 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "Y年n月j日" # 2016年9月5日 TIME_FORMAT = "H:i" # 20:45 DATETIME_FORMAT = "Y年n月j日 H:i" # 2016年9月5日 20:45 YEAR_MONTH_...
2016-09-05' "%Y年%n月%j日", # '2016年9月5日' ] TIME_INPUT_FORMATS = [ "%H:%M", # '20:45' "%H:%M:%S", # '20:45:29' "%H:%M:%S.%f", # '20:45:29.000200' ] DATETIME_INPUT_FORMATS = [ "%Y/%m/%d %H:%M", # '2016/09/05 20:45' "%Y-%m-%d %H:%
day) # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%Y/%m/%d", # '2016/09/05' "%Y-%m-%d", # '
{ "filepath": "django/conf/locale/zh_Hans/formats.py", "language": "python", "file_size": 1598, "cut_index": 524, "middle_length": 229 }
his file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" TIME_FORMAT = "P" DATETIME_FORMAT = "j F Y P" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F...
.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M", #
n.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m
{ "filepath": "django/conf/locale/ig/formats.py", "language": "python", "file_size": 1119, "cut_index": 515, "middle_length": 229 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "d/m/Y" TIME_FORMAT = "P" DATETIME_FORMAT = "d/m/Y P" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F" S...
0/2006 14:30:59' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30:59.000200' "%d/%m/%Y %H:%M", # '25/10/2006 14:30' "%d/%m/%y %H:%M:%S", # '25/10/06 14:30:59' "%d/%m/%y %H:%M:%S.%f", # '25/10/06 14:30:59.000200' "%d/%m/%y %H:%M", # '25/
/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # '25/10/2006' "%d/%m/%y", # '25/10/06' "%Y-%m-%d", # '2006-10-25' ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", # '25/1
{ "filepath": "django/conf/locale/el/formats.py", "language": "python", "file_size": 1241, "cut_index": 518, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j M Y" # '25 Oct 2006' TIME_FORMAT = "P" # '2:30 p.m.' DATETIME_FORMAT = "j M Y, P" # '25 Oct 2006, 2:30 p.m.' YEAR_MONTH...
d/%m/%Y", # '25/10/2006' "%d/%m/%y", # '25/10/06' "%d %b %Y", # '25 Oct 2006' "%d %b, %Y", # '25 Oct, 2006' "%d %B %Y", # '25 October 2006' "%d %B, %Y", # '25 October, 2006' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", #
WEEK = 0 # Sunday # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%
{ "filepath": "django/conf/locale/ms/formats.py", "language": "python", "file_size": 1522, "cut_index": 537, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j. F" SHORT_DATE_FO...
25. okt 2006' # "%d %b %Y", # '25 okt 2006' # "%d. %b. %Y", # '25. okt. 2006' # "%d %b. %Y", # '25 okt. 2006' # "%d. %B %Y", # '25. oktober 2006' # "%d %B %Y", # '25 oktober 2006' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S
atetime.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' # "%d. %b %Y", # '
{ "filepath": "django/conf/locale/nb/formats.py", "language": "python", "file_size": 1552, "cut_index": 537, "middle_length": 229 }
e same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F" SHORT_DATE_FORMAT = "j F Y...
"%Y/%m/%d", # '2006/10/25' ] TIME_INPUT_FORMATS = [ "%H:%M", # '14:30 "%H:%M:%S", # '14:30:59' ] DATETIME_INPUT_FORMATS = [ "%Y/%m/%d %H:%M", # '2006/10/25 14:30' "%Y/%m/%d %H:%M:%S", # '2006/10/25 14:30:59' ] DECIMAL_SEPARATOR = ","
strftime-strptime-behavior DATE_INPUT_FORMATS = [
{ "filepath": "django/conf/locale/ar_DZ/formats.py", "language": "python", "file_size": 901, "cut_index": 547, "middle_length": 52 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j N Y" DATETIME_FORMAT = "j N Y, G.i" TIME_FORMAT = "G.i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F" SHORT_DATE_FORM...
%Y", # '25 October 2006' "%m/%d/%y", # '10/25/06' "%m/%d/%Y", # '10/25/2009' ] TIME_INPUT_FORMATS = [ "%H.%M.%S", # '14.30.59' "%H.%M", # '14.30' ] DATETIME_INPUT_FORMATS = [ "%d-%m-%Y %H.%M.%S", # '25-10-2009 14.30.59' "%d
etime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d-%m-%Y", # '25-10-2009' "%d/%m/%Y", # '25/10/2009' "%d-%m-%y", # '25-10-09' "%d/%m/%y", # '25/10/09' "%d %b %Y", # '25 Oct 2006', "%d %B
{ "filepath": "django/conf/locale/id/formats.py", "language": "python", "file_size": 1644, "cut_index": 537, "middle_length": 229 }
s the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date # Formatting for date objects. DATE_FORMAT = "N j, Y" # Formatting for time objects. TIME_FORMAT = "P" # Formatting for datetime objects. DATETIME_FORMAT = "N j, Y,...
FIRST_DAY_OF_WEEK = 0 # Formats to be used when parsing dates from input boxes, in order. # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior # Note that thes
= "F j" # Short formatting for date objects. SHORT_DATE_FORMAT = "m/d/Y" # Short formatting for datetime objects. SHORT_DATETIME_FORMAT = "m/d/Y P" # First day of week, to be used on calendars. # 0 means Sunday, 1 means Monday...
{ "filepath": "django/conf/locale/en/formats.py", "language": "python", "file_size": 2438, "cut_index": 563, "middle_length": 229 }
e. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F, Y" TIME_FORMAT = "g:i A" # DATETIME_FORMAT = YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j F" SHORT_DATE_FORMAT = "j M, Y" # SHORT_DATETIME_FORMAT = FIRST_DAY_OF_...
/10/16 "%d-%m-%Y", # 25-10-2016 "%d-%m-%y", # 25-10-16 ] TIME_INPUT_FORMATS = [ "%H:%M:%S", # 14:30:59 "%H:%M", # 14:30 ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", # 25/10/2006 14:30:59 "%d/%m/%Y %H:%M", # 25/10/2006 14:
"%d/%m/%Y", # 25/10/2016 "%d/%m/%y", # 25
{ "filepath": "django/conf/locale/bn/formats.py", "language": "python", "file_size": 964, "cut_index": 582, "middle_length": 52 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j E Y г." TIME_FORMAT = "G:i" DATETIME_FORMAT = "j E Y г. G:i" YEAR_MONTH_FORMAT = "F Y г." MONTH_DAY_FOR...
"%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200' "%d.%m.%y
docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
{ "filepath": "django/conf/locale/tk/formats.py", "language": "python", "file_size": 1160, "cut_index": 518, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"j \d\e F \d\e Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = r"j \d\e F \d\e Y à\s H:i" YEAR_MONTH_FORMAT = r"F \d\e Y" MONTH_DAY...
'25/10/06' # "%d de %b de %Y", # '25 de Out de 2006' # "%d de %b, %Y", # '25 Out, 2006' # "%d de %B de %Y", # '25 de Outubro de 2006' # "%d de %B, %Y", # '25 de Outubro, 2006' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", # '2
e https://docs.python.org/library/datetime.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%d/%m/%Y", # '25/10/2006' "%d/%m/%y", #
{ "filepath": "django/conf/locale/pt/formats.py", "language": "python", "file_size": 1520, "cut_index": 537, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y." TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y. H:i" YEAR_MONTH_FORMAT = "F Y." MONTH_DAY_FORMAT = "j. F" SHORT_DATE...
06.' # "%d. %B %y.", # '25. October 06.' # "%d. %b '%y.", # '25. Oct '06.' # "%d. %B '%y.", #'25. October '06.' # "%d. %b %Y.", # '25. Oct 2006.' # "%d. %B %Y.", # '25. October 2006.' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y. %H
me.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y.", # '25.10.2006.' "%d.%m.%y.", # '25.10.06.' "%d. %m. %Y.", # '25. 10. 2006.' "%d. %m. %y.", # '25. 10. 06.' # "%d. %b %y.", # '25. Oct
{ "filepath": "django/conf/locale/sr_Latn/formats.py", "language": "python", "file_size": 1728, "cut_index": 537, "middle_length": 229 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j M Y" # 25 Oct 2006 TIME_FORMAT = "P" # 2:30 p.m. DATETIME_FORMAT = "j M Y, P" # 25 Oct 2006, 2:30 p...
ME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", # '2006-05-15 14:30:57' "%y-%m-%d %H:%M:%S", # '06-05-15 14:30:57' "%Y-%m-%d %H:%M:%S.%f", # '2006-05-15 14:30:57.000200' "%y-%m-%d %H:%M:%S.%f", # '06-05-15 14:30:57.000200' "%Y-%m-%d %H:%M
T_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-05-15' "%y-%m-%d", # '06-05-15' ] DATETI
{ "filepath": "django/conf/locale/en_CA/formats.py", "language": "python", "file_size": 1166, "cut_index": 518, "middle_length": 229 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "d F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j. F" S...
"%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200
/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' "%d. %m. %Y", # '25. 10. 2006' "%d. %m. %y", # '25. 10. 06' ] DATETIME_INPUT_FORMATS = [
{ "filepath": "django/conf/locale/mk/formats.py", "language": "python", "file_size": 1451, "cut_index": 524, "middle_length": 229 }
his file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j E Y" TIME_FORMAT = "G:i" DATETIME_FORMAT = "j E Y, G:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT =...
%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M", # '25.10.06 14:30' ] DECIMAL
python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "
{ "filepath": "django/conf/locale/az/formats.py", "language": "python", "file_size": 1087, "cut_index": 515, "middle_length": 229 }
This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j E Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j E Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT ...
"%d. %b. %Y", # '25. paź. 2006' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' ] DECIMAL_SEPARATOR = "," THOUSAND_SEPAR
s.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' "%y-%m-%d", # '06-10-25' # "%d. %B %Y", # '25. października 2006' #
{ "filepath": "django/conf/locale/pl/formats.py", "language": "python", "file_size": 1032, "cut_index": 513, "middle_length": 229 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j E Y г." TIME_FORMAT = "G:i" DATETIME_FORMAT = "j E Y г. G:i" YEAR_MONTH_FORMAT = "F Y г." MONTH_DAY_FOR...
"%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200' "%d.%m.%y
docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59'
{ "filepath": "django/conf/locale/tg/formats.py", "language": "python", "file_size": 1160, "cut_index": 518, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "N j, Y" TIME_FORMAT = "P" DATETIME_FORMAT = "N j, Y, P" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "F j" SHORT_DATE_FORMAT...
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", #
e.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%m/%d/%Y", # '10/25/2006' "%m/%d/%y", # '10/25/06' # "%b %d %Y", # 'Oct 25
{ "filepath": "django/conf/locale/ml/formats.py", "language": "python", "file_size": 1597, "cut_index": 537, "middle_length": 229 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "Y年n月j日" # 2016年9月5日 TIME_FORMAT = "H:i" # 20:45 DATETIME_FORMAT = "Y年n月j日 H:i" # 2016年9月5日 20:45 YEAR_MONTH_...
2016-09-05' "%Y年%n月%j日", # '2016年9月5日' ] TIME_INPUT_FORMATS = [ "%H:%M", # '20:45' "%H:%M:%S", # '20:45:29' "%H:%M:%S.%f", # '20:45:29.000200' ] DATETIME_INPUT_FORMATS = [ "%Y/%m/%d %H:%M", # '2016/09/05 20:45' "%Y-%m-%d %H:%
day) # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%Y/%m/%d", # '2016/09/05' "%Y-%m-%d", # '
{ "filepath": "django/conf/locale/zh_Hant/formats.py", "language": "python", "file_size": 1598, "cut_index": 524, "middle_length": 229 }
ngs use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"j E \d\e Y" TIME_FORMAT = "G:i" DATETIME_FORMAT = r"j E \d\e Y \a \l\e\s G:i" YEAR_MONTH_FORMAT = r"F \d\e\l Y" MONTH_DAY_FORMAT = r"j E" SHORT_DATE_FORMAT = "d/m/Y" SHORT_DATETIME_FORMAT = "d...
' "%d/%m/%y", # '31/12/09' ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", "%d/%m/%Y %H:%M:%S.%f", "%d/%m/%Y %H:%M", "%d/%m/%y %H:%M:%S", "%d/%m/%y %H:%M:%S.%f", "%d/%m/%y %H:%M", ] DECIMAL_SEPARATOR = "," THOUSAND_SEPARATOR
ATE_INPUT_FORMATS = [ "%d/%m/%Y", # '31/12/2009
{ "filepath": "django/conf/locale/ca/formats.py", "language": "python", "file_size": 940, "cut_index": 606, "middle_length": 52 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"j-E, Y-\y\i\l" TIME_FORMAT = "G:i" DATETIME_FORMAT = r"j-E, Y-\y\i\l G:i" YEAR_MONTH_FORMAT = r"F Y-\y\i...
%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d-%B, %Y-yil %H:%M:%S", # '25-Oktabr, 2006-yil 14:30:59' "%d-%B, %Y-yil %H:%M:%S.%f", # '25-Oktabr, 2006-yi
x, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d-%B, %Y-yil", # '25-Oktabr, 2006-yil' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:
{ "filepath": "django/conf/locale/uz/formats.py", "language": "python", "file_size": 1176, "cut_index": 518, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j. F" SHORT_DATE_FO...
25. okt 2006' # "%d %b %Y", # '25 okt 2006' # "%d. %b. %Y", # '25. okt. 2006' # "%d %b. %Y", # '25 okt. 2006' # "%d. %B %Y", # '25. oktober 2006' # "%d %B %Y", # '25 oktober 2006' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S
atetime.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' # "%d. %b %Y", # '
{ "filepath": "django/conf/locale/nn/formats.py", "language": "python", "file_size": 1552, "cut_index": 537, "middle_length": 229 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j F Y" # '25 Hydref 2006' TIME_FORMAT = "P" # '2:30 y.b.' DATETIME_FORMAT = "j F Y, P" # '25 Hydref 2006, 2:...
# '25/10/2006' "%d/%m/%y", # '25/10/06' ] DATETIME_INPUT_FORMATS = [ "%Y-%m-%d %H:%M:%S", # '2006-10-25 14:30:59' "%Y-%m-%d %H:%M:%S.%f", # '2006-10-25 14:30:59.000200' "%Y-%m-%d %H:%M", # '2006-10-25 14:30' "%d/%m/%Y %H:%M:%S", #
b.' FIRST_DAY_OF_WEEK = 1 # 'Dydd Llun' # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y",
{ "filepath": "django/conf/locale/cy/formats.py", "language": "python", "file_size": 1355, "cut_index": 524, "middle_length": 229 }
FieldMixin): "A Field plus data" def __init__(self, form, field, name): self.form = form self.field = field self.name = name self.html_name = form.add_prefix(name) self.html_initial_name = form.add_initial_prefix(name) self.html_initial_id = form.add_initial_pref...
ubwidget for each choice. This property is cached so that only one database query occurs when rendering ModelChoiceFields. """ id_ = self.field.widget.attrs.get("id") or self.auto_id attrs = {"id": id_} if id_ else
t or "" self.renderer = form.renderer @cached_property def subwidgets(self): """ Most widgets yield a single subwidget, but others like RadioSelect and CheckboxSelectMultiple produce one s
{ "filepath": "django/forms/boundfield.py", "language": "python", "file_size": 13373, "cut_index": 921, "middle_length": 229 }
utils.translation import gettext as _ from .renderers import get_default_renderer __all__ = ("BaseForm", "Form") class DeclarativeFieldsMetaclass(MediaDefiningClass): """Collect Fields declared on the base classes.""" def __new__(mcs, name, bases, attrs): # Collect fields from current class and rem...
if hasattr(base, "declared_fields"): declared_fields.update(base.declared_fields) # Field shadowing. for attr, value in base.__dict__.items(): if value is None and attr in declared_fields:
new_class = super().__new__(mcs, name, bases, attrs) # Walk through the MRO. declared_fields = {} for base in reversed(new_class.__mro__): # Collect fields from base class.
{ "filepath": "django/forms/forms.py", "language": "python", "file_size": 16112, "cut_index": 921, "middle_length": 229 }
file_field_list = [] for f in opts.fields: if ( not f.editable or isinstance(f, models.AutoField) or f.name not in cleaned_data ): continue if fields is not None and f.name not in fields: continue if exclude and f.name in ...
n form[f.name].field.empty_values ): continue # Defer saving file-type fields until after the other fields, so a # callable upload_to can use the values from other fields. if isinstance(f, models.FileField):
. if ( f.has_default() and form[f.name].field.widget.value_omitted_from_data( form.data, form.files, form.add_prefix(f.name) ) and cleaned_data.get(f.name) i
{ "filepath": "django/forms/models.py", "language": "python", "file_size": 62211, "cut_index": 2151, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"j\-\a \d\e F Y" # '26-a de julio 1887' TIME_FORMAT = "H:i" # '18:59' DATETIME_FORMAT = r"j\-\a \d\e F Y\, \j\e H:i" # '2...
ior DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '1887-07-26' "%y-%m-%d", # '87-07-26' "%Y %m %d", # '1887 07 26' "%Y.%m.%d", # '1887.07.26' "%d-a de %b %Y", # '26-a de jul 1887' "%d %b %Y", # '26 jul 1887' "%d-a de %B %Y", # '26
_FORMAT = "Y-m-d H:i" # '1887-07-26 18:59' FIRST_DAY_OF_WEEK = 1 # Monday (lundo) # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behav
{ "filepath": "django/conf/locale/eo/formats.py", "language": "python", "file_size": 1715, "cut_index": 537, "middle_length": 229 }
his file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j E Y г." TIME_FORMAT = "G:i" DATETIME_FORMAT = "j E Y г. G:i" YEAR_MONTH_FORMAT = "F Y г." MONTH_DAY_...
9' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '25.10.06 14:30:59.000200' "%d.%m.%y %H:%M", # '25.10.06 14:30' ]
://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:5
{ "filepath": "django/conf/locale/ru/formats.py", "language": "python", "file_size": 1098, "cut_index": 515, "middle_length": 229 }
file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "...
ETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' ] # Swiss number formatting can vary based on context (e.g. Fr. 23.50 vs 22,5
ython.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' # "%d. %B %Y", # '25. October 2006' # "%d. %b. %Y", # '25. Oct. 2006' ] DAT
{ "filepath": "django/conf/locale/de_CH/formats.py", "language": "python", "file_size": 1187, "cut_index": 518, "middle_length": 229 }
se as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j. F" SHORT_DATE_FORMAT = "d.m.Y" SHORT_D...
5.10.2006' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' ] DECIMAL_SEPARATOR = "," THOUSAND_SEPARATOR = "." NUMBER_GROU
ehavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '2
{ "filepath": "django/conf/locale/da/formats.py", "language": "python", "file_size": 876, "cut_index": 559, "middle_length": 52 }
e. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"j \d\e F \d\e Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = r"j \d\e F \d\e Y \a \l\a\s H:i" YEAR_MONTH_FORMAT = r"F \d\e Y" MONTH_DAY_FORMAT = r"j \d\e F" SHORT_DATE_FORMAT...
TS = [ "%d/%m/%Y", # '31/12/2009' "%d/%m/%y", # '31/12/09' ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", "%d/%m/%Y %H:%M:%S.%f", "%d/%m/%Y %H:%M", "%d/%m/%y %H:%M:%S", "%d/%m/%y %H:%M:%S.%f", "%d/%m/%y %H:%M", ] DECIMA
ime.html#strftime-strptime-behavior DATE_INPUT_FORMA
{ "filepath": "django/conf/locale/es/formats.py", "language": "python", "file_size": 978, "cut_index": 582, "middle_length": 52 }
"MultipleChoiceField", "ComboField", "MultiValueField", "FloatField", "DecimalField", "SplitDateTimeField", "GenericIPAddressField", "FilePathField", "JSONField", "SlugField", "TypedChoiceField", "TypedMultipleChoiceField", "UUIDField", ) class Field: widget = Tex...
("This field is required."), } empty_values = list(validators.EMPTY_VALUES) bound_field_class = None def __init__( self, *, required=True, widget=None, label=None, initial=None, help_
ors = [] # Default set of validators # Add an 'invalid' entry to default_error_message if you want a specific # field error message not raised by the field validators. default_error_messages = { "required": _
{ "filepath": "django/forms/fields.py", "language": "python", "file_size": 48981, "cut_index": 2151, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j M Y" # '25 Oct 2006' TIME_FORMAT = "P" # '2:30 p.m.' DATETIME_FORMAT = "j M Y, P" # '25 Oct 2006, 2:30 p.m.' YEAR_MONTH...
d/%m/%y", # '25/10/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' # "%
WEEK = 0 # Sunday # The *_INPUT_FORMATS strings use the Python strftime format syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # '25/10/2006' "%
{ "filepath": "django/conf/locale/en_AU/formats.py", "language": "python", "file_size": 1650, "cut_index": 537, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"Y. \g\a\d\a j. F" TIME_FORMAT = "H:i" DATETIME_FORMAT = r"Y. \g\a\d\a j. F, H:i" YEAR_MONTH_FORMAT = r"Y. \g. F" MONTH_DAY_...
10.06' ] TIME_INPUT_FORMATS = [ "%H:%M:%S", # '14:30:59' "%H:%M:%S.%f", # '14:30:59.000200' "%H:%M", # '14:30' "%H.%M.%S", # '14.30.59' "%H.%M.%S.%f", # '14.30.59.000200' "%H.%M", # '14.30' ] DATETIME_INPUT_FORMATS = [ "%Y
ps://docs.python.org/library/datetime.html#strftime-strptime-behavior # Kept ISO formats as they are in first position DATE_INPUT_FORMATS = [ "%Y-%m-%d", # '2006-10-25' "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.
{ "filepath": "django/conf/locale/lv/formats.py", "language": "python", "file_size": 1713, "cut_index": 537, "middle_length": 229 }
is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r"j \d\e F \d\e Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = r"j \d\e F \d\e Y à\s H:i" YEAR_MONTH_FORMAT = r"F \d\e...
de %b, %Y", # '25 Out, 2006' # "%d de %B de %Y", # '25 de Outubro de 2006' # "%d de %B, %Y", # '25 de Outubro, 2006' ] DATETIME_INPUT_FORMATS = [ "%d/%m/%Y %H:%M:%S", # '25/10/2006 14:30:59' "%d/%m/%Y %H:%M:%S.%f", # '25/10/2006 14:30
syntax, # see https://docs.python.org/library/datetime.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d/%m/%Y", # '25/10/2006' "%d/%m/%y", # '25/10/06' # "%d de %b de %Y", # '24 de Out de 2006' # "%d
{ "filepath": "django/conf/locale/pt_BR/formats.py", "language": "python", "file_size": 1285, "cut_index": 524, "middle_length": 229 }
a formset DEFAULT_MIN_NUM = 0 # default maximum number of forms in a formset, to prevent memory exhaustion DEFAULT_MAX_NUM = 1000 class ManagementForm(Form): """ Keep track of how many form instances are displayed on the page. If adding new forms via JavaScript, you should increment the count field of t...
nput) MAX_NUM_FORMS = IntegerField(required=False, widget=HiddenInput) def clean(self): cleaned_data = super().clean() # When the management form is invalid, we don't know how many forms # were submitted. cleaned_da
t with the rest of the # management form, but only for the convenience of client-side code. The # POST value of them returned from the client is not checked. MIN_NUM_FORMS = IntegerField(required=False, widget=HiddenI
{ "filepath": "django/forms/formsets.py", "language": "python", "file_size": 21324, "cut_index": 1331, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y." TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y. H:i" YEAR_MONTH_FORMAT = "F Y." MONTH_DAY_FORMAT = "j. F" SHORT_DATE...
06.' # "%d. %B %y.", # '25. October 06.' # "%d. %b '%y.", # '25. Oct '06.' # "%d. %B '%y.", # '25. October '06.' # "%d. %b %Y.", # '25. Oct 2006.' # "%d. %B %Y.", # '25. October 2006.' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y. %
me.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y.", # '25.10.2006.' "%d.%m.%y.", # '25.10.06.' "%d. %m. %Y.", # '25. 10. 2006.' "%d. %m. %y.", # '25. 10. 06.' # "%d. %b %y.", # '25. Oct
{ "filepath": "django/conf/locale/sr/formats.py", "language": "python", "file_size": 1729, "cut_index": 537, "middle_length": 229 }
import timezone from django.utils.html import escape, format_html_join from django.utils.safestring import mark_safe from django.utils.translation import gettext_lazy as _ def pretty_name(name): """Convert 'first_name' to 'First name'.""" if not name: return "" return name.replace("_", " ").capita...
sed through 'mark_safe' (by way of 'format_html_join'). """ key_value_attrs = [] boolean_attrs = [] for attr, value in attrs.items(): if isinstance(value, bool): if value: boolean_attrs.append((attr,))
s. In the case of a boolean value, the key will appear without a value. It is assumed that the keys do not need to be XML-escaped. If the passed dictionary is empty, then return an empty string. The result is pas
{ "filepath": "django/forms/utils.py", "language": "python", "file_size": 7974, "cut_index": 716, "middle_length": 229 }
alled_apps argument.") # Mapping of app labels => model names => model classes. Every time a # model is imported, ModelBase.__new__ calls apps.register_model which # creates an entry in all_models. All imported models are registered, # regardless of whether they're defined in an install...
current state in # set_available_apps and set_installed_apps. self.stored_app_configs = [] # Whether the registry is populated. self.apps_ready = self.models_ready = self.ready = False # For the autoreloader.
s is never overridden or reset. self.all_models = defaultdict(dict) # Mapping of labels to AppConfig instances for installed apps. self.app_configs = {} # Stack of app_configs. Used to store the
{ "filepath": "django/apps/registry.py", "language": "python", "file_size": 17707, "cut_index": 1331, "middle_length": 229 }
d under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "d. F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y. H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j. F" SHORT_DATE_F...
IME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%m.%Y %H:%M", # '25.10.2006 14:30' "%d.%m.%y %H:%M:%S", # '25.10.06 14:30:59' "%d.%m.%y %H:%M:%S.%f", # '
e.html#strftime-strptime-behavior DATE_INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006' "%d.%m.%y", # '25.10.06' "%d-%m-%Y", # '25-10-2006' "%d. %m. %Y", # '25. 10. 2006' "%d. %m. %y", # '25. 10. 06' ] DATET
{ "filepath": "django/conf/locale/sl/formats.py", "language": "python", "file_size": 1642, "cut_index": 537, "middle_length": 229 }
cvar.set(cvalue) async def _run_parallel(*coros): """ Execute multiple asynchronous coroutines in parallel, sharing the current context between them. """ context = contextvars.copy_context() if len(coros) == 0: return [] async def run(i, coro): results[i] = await...
ore_context(context=context) class Signal: """ Base class for all signals Internal attributes: receivers: [ ( (id(receiver), id(sender)), ref(receiver),
, context=context) return results except BaseExceptionGroup as exception_group: if len(exception_group.exceptions) == 1: raise exception_group.exceptions[0] raise finally: _rest
{ "filepath": "django/dispatch/dispatcher.py", "language": "python", "file_size": 19563, "cut_index": 1331, "middle_length": 229 }
t__(self, app_name, app_module): # Full Python path to the application e.g. 'django.contrib.admin'. self.name = app_name # Root module for the application e.g. <module 'django.contrib.admin' # from 'django/contrib/admin/__init__.py'>. self.module = app_module # Referenc...
if not hasattr(self, "label"): self.label = app_name.rpartition(".")[2] if not self.label.isidentifier(): raise ImproperlyConfigured( "The app label '%s' is not a valid Python identifier." % self.label
defined at the class level in a # subclass, hence the test-and-set pattern. # Last component of the Python path to the application e.g. 'admin'. # This value must be unique across a Django project.
{ "filepath": "django/apps/config.py", "language": "python", "file_size": 11482, "cut_index": 921, "middle_length": 229 }
e. # # The *_FORMAT strings use the Django date format syntax, # see https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = "j. F Y" TIME_FORMAT = "H:i" DATETIME_FORMAT = "j. F Y H:i" YEAR_MONTH_FORMAT = "F Y" MONTH_DAY_FORMAT = "j. F" SHORT_DATE_FORMAT = "d.m.Y" SHORT_DATETIME_FORMAT = "d.m.Y...
"%d.%m.%y", # '25.10.06' # "%d. %B %Y", # '25. October 2006' # "%d. %b. %Y", # '25. Oct. 2006' ] DATETIME_INPUT_FORMATS = [ "%d.%m.%Y %H:%M:%S", # '25.10.2006 14:30:59' "%d.%m.%Y %H:%M:%S.%f", # '25.10.2006 14:30:59.000200' "%d.%
INPUT_FORMATS = [ "%d.%m.%Y", # '25.10.2006'
{ "filepath": "django/conf/locale/de/formats.py", "language": "python", "file_size": 996, "cut_index": 582, "middle_length": 52 }
r): # Compare path and attrs to ensure performant comparison # in Media.merge. return ( self.__class__ is other.__class__ and self._path == other._path and self.attributes == other.attributes ) or (isinstance(other, str) and self._path == other) d...
e): if ( attrs and self.attributes and (conflicts := attrs.keys() & self.attributes.keys()) ): conflicts = ", ".join(sorted(conflicts)) raise ValueError( f"{self.__
elf.attributes.items())) return hash(self._path) def __str__(self): return self.render() def __repr__(self): return f"{type(self).__qualname__}({self._path!r})" def render(self, *, attrs=Non
{ "filepath": "django/forms/widgets.py", "language": "python", "file_size": 42431, "cut_index": 2151, "middle_length": 229 }
rt Library, Node, TemplateSyntaxError from django.utils import formats register = Library() @register.filter(is_safe=False) def localize(value): """ Force a value to be rendered as a localized value. """ return str(formats.localize(value, use_l10n=True)) @register.filter(is_safe=False) def unlocali...
0n context.use_l10n = self.use_l10n output = self.nodelist.render(context) context.use_l10n = old_setting return output @register.tag("localize") def localize_tag(parser, token): """ Force or prevents localization
nodelist, use_l10n): self.nodelist = nodelist self.use_l10n = use_l10n def __repr__(self): return "<%s>" % self.__class__.__name__ def render(self, context): old_setting = context.use_l1
{ "filepath": "django/templatetags/l10n.py", "language": "python", "file_size": 1563, "cut_index": 537, "middle_length": 229 }
django.utils.encoding import iri_to_uri from django.utils.html import conditional_escape register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __init__(self, varname=None, name=None): if name is None: rais...
variable as arguments. tokens = token.contents.split() if len(tokens) > 1 and tokens[1] != "as": raise template.TemplateSyntaxError( "First argument in '%s' must be 'as'" % tokens[0] ) if len(
andle_token(cls, parser, token, name): """ Class method to parse prefix node and return a Node. """ # token.split_contents() isn't useful here because tags using this # method don't accept
{ "filepath": "django/templatetags/static.py", "language": "python", "file_size": 4730, "cut_index": 614, "middle_length": 229 }
, SafeString, mark_safe from django.utils.text import normalize_newlines # https://html.spec.whatwg.org/#void-elements VOID_ELEMENTS = frozenset( ( "area", "base", "br", "col", "embed", "hr", "img", "input", "link", "meta", "pa...
for use in HTML. Always escape input, even if it's already escaped and marked as such. This may result in double-escaping. If this is a concern, use conditional_escape() instead. """ return SafeString(html.escape(str(text))) _js_
ng ">" after 1k+ chars. long_open_tag_without_closing_re = _lazy_re_compile(r"<[a-zA-Z][^>]{1000,}") @keep_lazy(SafeString) def escape(text): """ Return the given text with ampersands, quotes and angle brackets encoded
{ "filepath": "django/utils/html.py", "language": "python", "file_size": 18534, "cut_index": 1331, "middle_length": 229 }
n RFC 9110 Appendix A. ETAG_MATCH = _lazy_re_compile( r""" \A( # start of string and capture group (?:W/)? # optional weak indicator " # opening quote [^"]* # any sequence of non-quote characters " # end quote )\Z # end of string and capture group """, re.X, )...
,9}, %s-%s-%s %s GMT$" % (__D, __M, __Y2, __T)) ASCTIME_DATE = _lazy_re_compile(r"^\w{3} %s %s %s %s$" % (__M, __D2, __T, __Y)) RFC3986_GENDELIMS = ":/?#[]@" RFC3986_SUBDELIMS = "!$&'()*+,;=" MAX_URL_LENGTH = 2048 MAX_URL_REDIRECT_LENGTH = 16384 def url
ar>[0-9]{4})" __Y2 = r"(?P<year>[0-9]{2})" __T = r"(?P<hour>[0-9]{2}):(?P<min>[0-9]{2}):(?P<sec>[0-9]{2})" RFC1123_DATE = _lazy_re_compile(r"^\w{3}, %s %s %s %s GMT$" % (__D, __M, __Y, __T)) RFC850_DATE = _lazy_re_compile(r"^\w{6
{ "filepath": "django/utils/http.py", "language": "python", "file_size": 14184, "cut_index": 921, "middle_length": 229 }
ils.version import PY314, PY315 if PY314: import annotationlib if not PY315: lock = threading.Lock() safe_signature_from_callable = functools.partial( inspect._signature_from_callable, annotation_format=annotationlib.Format.FORWARDREF, ) @functools.lru_cache(m...
_KINDS = frozenset( { inspect.Parameter.POSITIONAL_ONLY, inspect.Parameter.KEYWORD_ONLY, inspect.Parameter.POSITIONAL_OR_KEYWORD, } ) def get_func_args(func): params = _get_callable_parameters(func) return [param.n
ters def _get_callable_parameters(meth_or_func): is_method = inspect.ismethod(meth_or_func) func = meth_or_func.__func__ if is_method else meth_or_func return _get_func_parameters(func, remove_first=is_method) ARG
{ "filepath": "django/utils/inspect.py", "language": "python", "file_size": 4522, "cut_index": 614, "middle_length": 229 }
ango.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ MAX_IPV6_ADDRESS_LENGTH = 39 def _ipv6_address_from_str(ip_str, max_length=MAX_IPV6_ADDRESS_LENGTH): if len(ip_str) > max_length: raise ValueError( f"Unable to convert {ip_str} to an IPv6 addres...
move leading zeroes, and make sure all hextets are lowercase. Args: ip_str: A valid IPv6 address. unpack_ipv4: if an IPv4-mapped address is found, return the plain IPv4 address (default=False). error_message: An err
t a valid IPv6 address."), max_length=MAX_IPV6_ADDRESS_LENGTH, ): """ Clean an IPv6 address string. Raise ValidationError if the address is invalid. Replace the longest continuous zero-sequence with "::", re
{ "filepath": "django/utils/ipv6.py", "language": "python", "file_size": 1823, "cut_index": 537, "middle_length": 229 }
ils.module_loading import import_string request_logger = logging.getLogger("django.request") # Default logging for Django. This sends an email to the site admins on every # HTTP 500 error. Depending on DEBUG, all other log records are either sent to # the console (DEBUG=True) or discarded (DEBUG=False) by means of th...
}, "formatters": { "django.server": { "()": "django.utils.log.ServerFormatter", "format": "[{server_time}] {message}", "style": "{", } }, "handlers": { "console": { "level"
": False, "filters": { "require_debug_false": { "()": "django.utils.log.RequireDebugFalse", }, "require_debug_true": { "()": "django.utils.log.RequireDebugTrue", },
{ "filepath": "django/utils/log.py", "language": "python", "file_size": 10252, "cut_index": 921, "middle_length": 229 }
bore et dolore magna aliqua. Ut enim ad minim " "veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea " "commodo consequat. Duis aute irure dolor in reprehenderit in voluptate " "velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint " "occaecat cupidatat non proident, sunt...
", "quaerat", "dignissimos", "facilis", "neque", "nihil", "expedita", "vitae", "vero", "ipsum", "nisi", "animi", "cumque", "pariatur", "velit", "modi", "natus", "iusto", "eaque", "
", "nam", "nobis", "eum", "cum", "officiis", "excepturi", "odio", "consectetur", "quasi", "aut", "quisquam", "vel", "eligendi", "itaque", "non", "odit", "tempore
{ "filepath": "django/utils/lorem_ipsum.py", "language": "python", "file_size": 5473, "cut_index": 716, "middle_length": 229 }
pec as importlib_find def cached_import(module_path, class_name): # Check whether module is loaded and fully initialized. if not ( (module := sys.modules.get(module_path)) and (spec := getattr(module, "__spec__", None)) and getattr(spec, "_initializing", False) is False ): ...
a module path" % dotted_path) from err try: return cached_import(module_path, class_name) except AttributeError as err: raise ImportError( 'Module "%s" does not define a "%s" attribute/class' % (module_path,
y the last name in the path. Raise ImportError if the import failed. """ try: module_path, class_name = dotted_path.rsplit(".", 1) except ValueError as err: raise ImportError("%s doesn't look like
{ "filepath": "django/utils/module_loading.py", "language": "python", "file_size": 3820, "cut_index": 614, "middle_length": 229 }
_safe def format( number, decimal_sep, decimal_pos=None, grouping=0, thousand_sep="", force_grouping=False, use_l10n=None, ): """ Get a number (as a number or string), and return it as a string, using formats defined as arguments: * decimal_sep: Decimal separator symbol (f...
example ",") """ if number is None or number == "": return mark_safe(number) if use_l10n is None: use_l10n = True use_grouping = use_l10n and settings.USE_THOUSAND_SEPARATOR use_grouping = use_grouping or force_grouping
a sequence with the number of digit group sizes following the format used by the Python locale module in locale.localeconv() LC_NUMERIC grouping (e.g. (3, 2, 0)). * thousand_sep: Thousand separator symbol (for
{ "filepath": "django/utils/numberformat.py", "language": "python", "file_size": 3867, "cut_index": 614, "middle_length": 229 }
ass. So, e.g., # "\w" is replaced by "x" in a reverse URL. A value of None means to ignore # this sequence. Any missing key is mapped to itself. ESCAPE_MAPPINGS = { "A": None, "b": None, "B": None, "d": "0", "D": "x", "s": " ", "S": "x", "w": "x", "W": "!", "Z": None, } class C...
lowing: (1) For any repeating sections, keeps the minimum number of occurrences permitted (this means zero for optional groups). (2) If an optional group includes parameters, include one occurrence of that group (along with the zer
list): """Represent a non-capturing group in the pattern string.""" def normalize(pattern): r""" Given a reg-exp pattern, normalize it to an iterable of forms that suffice for reverse matching. This does the fol
{ "filepath": "django/utils/regex_helper.py", "language": "python", "file_size": 12772, "cut_index": 921, "middle_length": 229 }
ngs that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ from functools import wraps from django.utils.func...
"" __slots__ = () def __add__(self, rhs): """ Concatenating a safe string with another safe bytestring or safe string is safe. Otherwise, the result is no longer safe. """ if isinstance(rhs, str):
other template engines to understand Django's SafeData. """ return self class SafeString(str, SafeData): """ A str subclass that has been specifically marked as "safe" for HTML output purposes. "
{ "filepath": "django/utils/safestring.py", "language": "python", "file_size": 2178, "cut_index": 563, "middle_length": 229 }
% x for x in range(8)} RESET = "0" opt_dict = { "bold": "1", "underscore": "4", "blink": "5", "reverse": "7", "conceal": "8", } def colorize(text="", opts=(), **kwargs): """ Return your text, enclosed in ANSI graphics codes. Depends on the keyword arguments 'fg' and 'bg', and the con...
g='blue', opts=('blink',)) colorize() colorize('goodbye', opts=('underscore',)) print(colorize('first line', fg='red', opts=('noreset',))) print('this should be red too') print(colorize('and so should this'))
alid options: 'bold' 'underscore' 'blink' 'reverse' 'conceal' 'noreset' - string will not be auto-terminated with the RESET code Examples: colorize('hello', fg='red', b
{ "filepath": "django/utils/termcolors.py", "language": "python", "file_size": 7386, "cut_index": 716, "middle_length": 229 }
ext, lazy, ) from django.utils.regex_helper import _lazy_re_compile from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy, pgettext @keep_lazy_text def capfirst(x): """Capitalize the first letter of a string.""" if not x: return x if not isinstance...
ve all white space except added line breaks consume the space on which they break the line. Don't wrap long words, thus the output text may have lines longer than ``width``. """ wrapper = textwrap.TextWrapper( width=width,
mpile(r"(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))") @keep_lazy_text def wrap(text, width): """ A word-wrap function that preserves existing line breaks. Expects that existing line breaks are posix newlines. Preser
{ "filepath": "django/utils/text.py", "language": "python", "file_size": 15163, "cut_index": 921, "middle_length": 229 }
re from django.utils.translation import gettext, ngettext_lazy TIME_STRINGS = { "year": ngettext_lazy("%(num)d year", "%(num)d years", "num"), "month": ngettext_lazy("%(num)d month", "%(num)d months", "num"), "week": ngettext_lazy("%(num)d week", "%(num)d weeks", "num"), "day": ngettext_lazy("%(num)d d...
e, reversed=False, time_strings=None, depth=2): """ Take two datetime objects and return the time between d and now as a nicely formatted string, e.g. "10 minutes". If d occurs after now, return "0 minutes". Units used are years, month
list(TIME_STRINGS.keys()) TIME_CHUNKS = [ 60 * 60 * 24 * 7, # week 60 * 60 * 24, # day 60 * 60, # hour 60, # minute ] MONTHS_DAYS = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) def timesince(d, now=Non
{ "filepath": "django/utils/timesince.py", "language": "python", "file_size": 4917, "cut_index": 614, "middle_length": 229 }
l import Local from django.conf import settings __all__ = [ "get_fixed_timezone", "get_default_timezone", "get_default_timezone_name", "get_current_timezone", "get_current_timezone_name", "activate", "deactivate", "override", "localtime", "localdate", "now", "is_aware",...
accessing settings at compile time, # wrap the logic in a function and cache the result. @functools.lru_cache def get_default_timezone(): """ Return the default time zone as a tzinfo instance. This is the time zone defined by settings.TIME_ZO
offset = offset.total_seconds() // 60 sign = "-" if offset < 0 else "+" hhmm = "%02d%02d" % divmod(abs(offset), 60) name = sign + hhmm return timezone(timedelta(minutes=offset), name) # In order to avoid
{ "filepath": "django/utils/timezone.py", "language": "python", "file_size": 7291, "cut_index": 716, "middle_length": 229 }
y from django.utils.hashable import make_hashable class Node: """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes or other Node instances. """ # Standard connector type. Clients usually won't use this at a...
connector=None, negated=False): """ Create a new instance using Node() instead of __init__() as some subclasses, e.g. django.db.models.query_utils.Q, may implement a custom __init__() with a signature that conflicts with th
onnector is given, use the default.""" self.children = children[:] if children else [] self.connector = connector or self.default self.negated = negated @classmethod def create(cls, children=None,
{ "filepath": "django/utils/tree.py", "language": "python", "file_size": 4394, "cut_index": 614, "middle_length": 229 }
r import _lazy_re_compile # Private, stable API for detecting the Python implementation. PYPY = sys.implementation.name == "pypy" # Private, stable API for detecting the Python version. PYXY means "Python X.Y # or later". So that third-party apps can use these values, each constant # should remain as long as the olde...
# Now build the two parts of the version number: # main = X.Y[.Z] # sub = .devN - for pre-alpha releases # | {a|b|rc}N - for alpha, beta, and rc releases main = get_main_version(version) sub = "" if version[3] == "alpha" an
>= (3, 13) PY314 = sys.version_info >= (3, 14) PY315 = sys.version_info >= (3, 15) def get_version(version=None): """Return a PEP 440-compliant version number from VERSION.""" version = get_complete_version(version)
{ "filepath": "django/utils/version.py", "language": "python", "file_size": 3696, "cut_index": 614, "middle_length": 229 }
ilities for XML generation/parsing. """ import re from xml.sax.saxutils import XMLGenerator class UnserializableContentError(ValueError): pass class SimplerXMLGenerator(XMLGenerator): def addQuickElement(self, name, contents=None, attrs=None): "Convenience method for adding an element with no child...
.org/International/questions/qa-controls raise UnserializableContentError( "Control characters are not supported in XML 1.0" ) XMLGenerator.characters(self, content) def startElement(self, name, attrs):
) def characters(self, content): if content and re.search(r"[\x00-\x08\x0B-\x0C\x0E-\x1F]", content): # Fail loudly when content has control chars (unsupported in XML # 1.0) See https://www.w3
{ "filepath": "django/utils/xmlutils.py", "language": "python", "file_size": 1172, "cut_index": 518, "middle_length": 229 }
.functional import lazy from django.utils.regex_helper import _lazy_re_compile __all__ = [ "activate", "deactivate", "override", "deactivate_all", "get_language", "get_language_from_request", "get_language_info", "get_language_bidi", "check_for_language", "to_language", "to_...
late as possible, so that modules can be imported # without having to first configure Django, and (2) if some other code creates # a reference to one of these functions, don't break that reference when we # replace the functions with their real counterpar
", ] class TranslatorCommentWarning(SyntaxWarning): pass # Here be dragons, so a short explanation of the logic won't hurt: # We are trying to solve two problems: (1) access settings, in particular # settings.USE_I18N, as
{ "filepath": "django/utils/translation/__init__.py", "language": "python", "file_size": 8878, "cut_index": 716, "middle_length": 229 }
m pathlib import Path from asgiref.local import Local from django.apps import apps from django.utils.autoreload import is_django_module def watch_for_translation_changes(sender, **kwargs): """Register file watchers for .mo files in potential locale paths.""" from django.conf import settings if settings...
th, **kwargs): """Clear the internal translations cache if a .mo file is modified.""" if file_path.suffix == ".mo": import gettext from django.utils.translation import trans_real gettext._translations = {} trans_re
ango_module(config.module) ) directories.extend(Path(p) for p in settings.LOCALE_PATHS) for path in directories: sender.watch_dir(path, "**/*.mo") def translation_file_changed(sender, file_pa
{ "filepath": "django/utils/translation/reloader.py", "language": "python", "file_size": 1114, "cut_index": 515, "middle_length": 229 }
. """ return dot_re.sub(char, src) context_re = _lazy_re_compile(r"""^\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?'))\s*""") inline_re = _lazy_re_compile( # Match the trans/translate 'some text' part. r"""^\s*trans(?:late)?\s+((?:"[^"]*?")|(?:'[^']*?'))""" # Match and ignore optional filters r"""(?...
y_re_compile(r"""_\(((?:".*?")|(?:'.*?'))\)""") def templatize(src, origin=None): """ Turn a Django template into something that is understood by xgettext. It does so by translating the Django translation tags into standard gettext functi
le( r"""^\s*blocktrans(?:late)?(\s+.*context\s+((?:"[^"]*?")|(?:'[^']*?')))?(?:\s+|$)""" ) endblock_re = _lazy_re_compile(r"""^\s*endblocktrans(?:late)?$""") plural_re = _lazy_re_compile(r"""^\s*plural$""") constant_re = _laz
{ "filepath": "django/utils/translation/template.py", "language": "python", "file_size": 10549, "cut_index": 921, "middle_length": 229 }
versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. from django.conf import settings def gettext(message): return message gettext_noop = gettext_laz...
guage(): return settings.LANGUAGE_CODE def get_language_bidi(): return settings.LANGUAGE_CODE in settings.LANGUAGES_BIDI def check_for_language(x): return True def get_language_from_request(request, check_path=False): return settings.
gettext(message) def npgettext(context, singular, plural, number): return ngettext(singular, plural, number) def activate(x): return None def deactivate(): return None deactivate_all = deactivate def get_lan
{ "filepath": "django/utils/translation/trans_null.py", "language": "python", "file_size": 1287, "cut_index": 524, "middle_length": 229 }
gettext number to separate context from message CONTEXT_SEPARATOR = "\x04" # Maximum number of characters that will be parsed from the Accept-Language # header or cookie to prevent possible denial of service or memory exhaustion # attacks. About 10x longer than the longest value shown on MDN’s # Accept-Language page. ...
(?:\s*,\s*|$) """, re.VERBOSE, ) language_code_re = _lazy_re_compile( r"^[a-z]{1,8}(?:-[a-z0-9]{1,8})*(?:@[a-z0-9]{1,20})?$", re.IGNORECASE ) language_code_prefix_re = _lazy_re_compile(r"^/(\w+([@-]\w+){0,2})(/|$)") @receiver(setti
# "en", "en-au", "x-y-z", "es-419", "*" ([A-Za-z]{1,8}(?:-[A-Za-z0-9]{1,8})*|\*) # Optional "q=1.00", "q=0.8" (?:\s*;\s*q=(0(?:\.[0-9]{,3})?|1(?:\.0{,3})?))? # Multiple accepts per header.
{ "filepath": "django/utils/translation/trans_real.py", "language": "python", "file_size": 22339, "cut_index": 1331, "middle_length": 229 }
jango.http.cookie import SimpleCookie, parse_cookie from django.http.request import ( HttpHeaders, HttpRequest, QueryDict, RawPostDataException, UnreadablePostError, ) from django.http.response import ( BadHeaderError, FileResponse, Http404, HttpResponse, HttpResponseBadRequest, ...
ion", "UnreadablePostError", "HttpResponse", "HttpResponseBase", "StreamingHttpResponse", "HttpResponseRedirect", "HttpResponsePermanentRedirect", "HttpResponseNotModified", "HttpResponseBadRequest", "HttpResponseForbidd
HttpResponseRedirect, HttpResponseServerError, JsonResponse, StreamingHttpResponse, ) __all__ = [ "SimpleCookie", "parse_cookie", "HttpHeaders", "HttpRequest", "QueryDict", "RawPostDataExcept
{ "filepath": "django/http/__init__.py", "language": "python", "file_size": 1200, "cut_index": 518, "middle_length": 229 }
lass InputStreamExhausted(Exception): """ No more reads are allowed from this device. """ pass RAW = "raw" FILE = "file" FIELD = "field" FIELD_TYPES = frozenset([FIELD, RAW]) MAX_TOTAL_HEADER_SIZE = 1024 class MultiPartParser: """ An RFC 7578 multipart/form-data parser. ``MultiValueDic...
cts. :input_data: The raw post data, as a file-like object. :upload_handlers: A list of UploadHandler instances that perform operations on the uploaded data. :encoding: The encoding wi
200}[!-~]") def __init__(self, META, input_data, upload_handlers, encoding=None): """ Initialize the MultiPartParser object. :META: The standard ``META`` dictionary in Django request obje
{ "filepath": "django/http/multipartparser.py", "language": "python", "file_size": 28096, "cut_index": 1331, "middle_length": 229 }
se_header_parameters from django.utils.regex_helper import _lazy_re_compile RAISE_ERROR = object() host_validation_re = _lazy_re_compile( r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9.:]+\])(?::([0-9]+))?$" ) class UnreadablePostError(OSError): pass class RawPostDataException(Exception): """ You cannot acces...
bclass doesn't call `super`. # Any variable assignment made here should also happen in # `WSGIRequest.__init__()`. self.GET = QueryDict(mutable=True) self.POST = QueryDict(mutable=True) self.COOKIES = {} sel
# The encoding used in GET/POST dicts. None means use default setting. _encoding = None _upload_handlers = [] _multipart_parser_class = MultiPartParser def __init__(self): # WARNING: The `WSGIRequest` su
{ "filepath": "django/http/request.py", "language": "python", "file_size": 30293, "cut_index": 1331, "middle_length": 229 }
rt ( MAX_URL_REDIRECT_LENGTH, content_disposition_header, http_date, ) from django.utils.regex_helper import _lazy_re_compile _charset_from_content_type_re = _lazy_re_compile( r";\s*charset=(?P<charset>[^\s;]+)", re.I ) _control_chars_re = _lazy_re_compile(r"[\x00-\x1f\x7f-\x9f]") class ResponseHeade...
aders key/value to ascii/latin-1 native strings. `charset` must be 'ascii' or 'latin-1'. If `mime_encode` is True and `value` can't be represented in the given charset, apply MIME-encoding. """ try: if isinstance
lf._store = {} if data: for header, value in self._unpack_items(data): self[header] = value def _convert_to_charset(self, value, charset, mime_encode=False): """ Convert he
{ "filepath": "django/http/response.py", "language": "python", "file_size": 26970, "cut_index": 1331, "middle_length": 229 }
that are commented out # serve to show the default. import sys from os.path import abspath, dirname, join from sphinx import version_info as sphinx_version # Workaround for sphinx-build recursion limit overflow: # pickle.dump(doctree, f, pickle.HIGHEST_PROTOCOL) # RuntimeError: maximum recursion depth exceeded whi...
irectory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.append(abspath(join(dirname(__file__), "_ext"))) # Use the module to GitHub ur
64eGtv4/discussion sys.setrecursionlimit(2000) # Make sure we get the version of this copy of Django sys.path.insert(1, dirname(dirname(abspath(__file__)))) # If extensions (or modules to document with autodoc) are in another d
{ "filepath": "docs/conf.py", "language": "python", "file_size": 14810, "cut_index": 921, "middle_length": 229 }
xt, _is_very_long_string_literal, _starts_with_anonymous_hyperlink, _starts_with_directive_or_hyperlink, ) from sphinxlint.checkers import checker as sphinxlint_checker from sphinxlint.rst import SIMPLENAME from sphinxlint.sphinxlint import check_text from sphinxlint.utils import PER_FILE_CACHES, hide_non_r...
with open(filename, encoding="utf-8") as f: text = f.read() except OSError as err: return [f"{filename}: cannot open: {err}"] except UnicodeDecodeError as err: return [f"{filename}: cannot
if ".rst" in checker.suffixes: checker.suffixes = (".txt",) ext = splitext(filename)[1] if not any(ext in checker.suffixes for checker in checkers): return Counter() try:
{ "filepath": "docs/lint.py", "language": "python", "file_size": 7095, "cut_index": 716, "middle_length": 229 }
ption from sphinx.errors import ExtensionError from sphinx.util import logging from sphinx.util.console import bold from sphinx.writers.html import HTMLTranslator logger = logging.getLogger(__name__) # RE for option descriptions without a '--' prefix simple_option_desc_re = re.compile(r"([-_a-zA-Z0-9]+)(\s*.*?)(?=,\s+...
xtemplate="pair: %s; template filter", ) app.add_crossref_type( directivename="fieldlookup", rolename="lookup", indextemplate="pair: %s; field lookup type", ) app.add_object_type( directivename="django-admin"
type( directivename="templatetag", rolename="ttag", indextemplate="pair: %s; template tag", ) app.add_crossref_type( directivename="templatefilter", rolename="tfilter", inde
{ "filepath": "docs/_ext/djangodocs.py", "language": "python", "file_size": 14448, "cut_index": 921, "middle_length": 229 }
def __init__(self): super().__init__() self.current_path = [] self.node_line_numbers = {} self.import_locations = {} @classmethod def from_code(cls, code): tree = ast.parse(code) locator = cls() locator.visit(tree) return locator def vis...
if alias.asname: # Exclude linking aliases (`import x as y`) to avoid confusion # when clicking a source link to a differently named entity. continue if alias.name == "*": # Re
_path.pop() def visit_FunctionDef(self, node): self.visit_node(node) def visit_ClassDef(self, node): self.visit_node(node) def visit_ImportFrom(self, node): for alias in node.names:
{ "filepath": "docs/_ext/github_links.py", "language": "python", "file_size": 4728, "cut_index": 614, "middle_length": 229 }
imeKeeper, TimeKeeper, get_runner from django.utils.deprecation import ( RemovedAfterNextVersionWarning, RemovedInNextVersionWarning, ) from django.utils.functional import classproperty from django.utils.log import DEFAULT_LOGGING from django.utils.version import PYPY try: impo...
g errors to ensure no usage of error prone # patterns. warnings.simplefilter("error", ResourceWarning) warnings.simplefilter("error", RuntimeWarning) # Reduce garbage collection frequency to improve performance. Since CPython # uses refcounting, garbage c
deprecation warnings errors to ensure no usage of deprecated features. warnings.simplefilter("error", RemovedInNextVersionWarning) warnings.simplefilter("error", RemovedAfterNextVersionWarning) # Make resource and runtime warnin
{ "filepath": "tests/runtests.py", "language": "python", "file_size": 27785, "cut_index": 1331, "middle_length": 229 }
# This is an example test settings file for use with the Django test suite. # # The 'sqlite3' backend requires only the ENGINE setting (an in- # memory database will be used). All other backends will require a # NAME and potentially authentication information. See the # following section in the docs for more informatio...
"django.db.backends.sqlite3", }, "other": { "ENGINE": "django.db.backends.sqlite3", }, } SECRET_KEY = "django_tests_secret_key" # Use a fast hasher to speed up tests. PASSWORD_HASHERS = [ "django.contrib.auth.hashers.MD5PasswordHa
is recommended to run the test suite against as many # database backends as possible. You may want to create a separate settings # file for each of the backends you test against. DATABASES = { "default": { "ENGINE":
{ "filepath": "tests/test_sqlite.py", "language": "python", "file_size": 1022, "cut_index": 512, "middle_length": 229 }
ces cannot be assigned new attributes. Define a subclass # in order to define new attributes in do_timezone(). class datetimeobject(datetime): pass # Template filters @register.filter def localtime(value): """ Convert a datetime to local time in the active time zone. This only makes sense within a ...
Naive datetimes are assumed to be in local time in the default time zone. """ if not isinstance(value, datetime): return "" # Obtain a timezone-aware datetime try: if timezone.is_naive(value): default_time
o_timezone(value, UTC) @register.filter("timezone") def do_timezone(value, arg): """ Convert a datetime to local time in a given time zone. The argument must be an instance of a tzinfo subclass or a time zone name.
{ "filepath": "django/templatetags/tz.py", "language": "python", "file_size": 5273, "cut_index": 716, "middle_length": 229 }
y person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Softwar...
S OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ import os import shu
HE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR
{ "filepath": "django/utils/archive.py", "language": "python", "file_size": 8301, "cut_index": 716, "middle_length": 229 }
ught. Keep a list of these # file paths to allow watching them in the future. _error_files = [] _exception = None # Exception raised while loading the URLConf. _url_module_exception = None try: import termios except ImportError: termios = None try: import pywatchman except ImportError: pywatchman = N...
fn(*args, **kwargs) except Exception as e: _exception = sys.exc_info() et, ev, tb = _exception if getattr(ev, "filename", None) is None: # get the filename from the last item in the
True if the given file path is nested under Django.""" return Path(django.__file__).parent in Path(path).parents def check_errors(fn): @wraps(fn) def wrapper(*args, **kwargs): global _exception try:
{ "filepath": "django/utils/autoreload.py", "language": "python", "file_size": 25048, "cut_index": 1331, "middle_length": 229 }