Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #7980 - Improved i18n framework to support locale aware formatt…

…ing (dates and numbers) and form processing.

Thanks to Marc Garcia for working on this during his Google Summer of Code 2009!

Additionally fixes #1061, #2203, #3940, #5526, #6449, #6231, #6693, #6783, #9366 and #10891.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9233d0426537615e06b78d28010d17d5a66adf44 1 parent 6632739
@jezdez jezdez authored
Showing with 2,314 additions and 356 deletions.
  1. +74 −0 django/conf/global_settings.py
  2. 0  django/conf/locale/__init__.py
  3. 0  django/conf/locale/ar/__init__.py
  4. +18 −0 django/conf/locale/ar/formats.py
  5. 0  django/conf/locale/bg/__init__.py
  6. +18 −0 django/conf/locale/bg/formats.py
  7. 0  django/conf/locale/bn/__init__.py
  8. +18 −0 django/conf/locale/bn/formats.py
  9. 0  django/conf/locale/ca/__init__.py
  10. +30 −0 django/conf/locale/ca/formats.py
  11. 0  django/conf/locale/cs/__init__.py
  12. +18 −0 django/conf/locale/cs/formats.py
  13. 0  django/conf/locale/cy/__init__.py
  14. +18 −0 django/conf/locale/cy/formats.py
  15. 0  django/conf/locale/da/__init__.py
  16. +26 −0 django/conf/locale/da/formats.py
  17. 0  django/conf/locale/de/__init__.py
  18. +32 −0 django/conf/locale/de/formats.py
  19. 0  django/conf/locale/el/__init__.py
  20. +18 −0 django/conf/locale/el/formats.py
  21. 0  django/conf/locale/en/__init__.py
  22. +38 −0 django/conf/locale/en/formats.py
  23. 0  django/conf/locale/es/__init__.py
  24. +30 −0 django/conf/locale/es/formats.py
  25. 0  django/conf/locale/es_AR/__init__.py
  26. +18 −0 django/conf/locale/es_AR/formats.py
  27. 0  django/conf/locale/et/__init__.py
  28. +18 −0 django/conf/locale/et/formats.py
  29. 0  django/conf/locale/eu/__init__.py
  30. +18 −0 django/conf/locale/eu/formats.py
  31. 0  django/conf/locale/fa/__init__.py
  32. +18 −0 django/conf/locale/fa/formats.py
  33. 0  django/conf/locale/fi/__init__.py
  34. +18 −0 django/conf/locale/fi/formats.py
  35. 0  django/conf/locale/fr/__init__.py
  36. +18 −0 django/conf/locale/fr/formats.py
  37. 0  django/conf/locale/ga/__init__.py
  38. +18 −0 django/conf/locale/ga/formats.py
  39. 0  django/conf/locale/gl/__init__.py
  40. +18 −0 django/conf/locale/gl/formats.py
  41. 0  django/conf/locale/he/__init__.py
  42. +18 −0 django/conf/locale/he/formats.py
  43. 0  django/conf/locale/hi/__init__.py
  44. +18 −0 django/conf/locale/hi/formats.py
  45. 0  django/conf/locale/hr/__init__.py
  46. +18 −0 django/conf/locale/hr/formats.py
  47. 0  django/conf/locale/hu/__init__.py
  48. +18 −0 django/conf/locale/hu/formats.py
  49. 0  django/conf/locale/is/__init__.py
  50. +18 −0 django/conf/locale/is/formats.py
  51. 0  django/conf/locale/it/__init__.py
  52. +18 −0 django/conf/locale/it/formats.py
  53. 0  django/conf/locale/ja/__init__.py
  54. +18 −0 django/conf/locale/ja/formats.py
  55. 0  django/conf/locale/ka/__init__.py
  56. +42 −0 django/conf/locale/ka/formats.py
  57. 0  django/conf/locale/km/__init__.py
  58. +18 −0 django/conf/locale/km/formats.py
  59. 0  django/conf/locale/kn/__init__.py
  60. +18 −0 django/conf/locale/kn/formats.py
  61. 0  django/conf/locale/ko/__init__.py
  62. +44 −0 django/conf/locale/ko/formats.py
  63. 0  django/conf/locale/lt/__init__.py
  64. +18 −0 django/conf/locale/lt/formats.py
  65. 0  django/conf/locale/lv/__init__.py
  66. +18 −0 django/conf/locale/lv/formats.py
  67. 0  django/conf/locale/mk/__init__.py
  68. +18 −0 django/conf/locale/mk/formats.py
  69. 0  django/conf/locale/nl/__init__.py
  70. +48 −0 django/conf/locale/nl/formats.py
  71. 0  django/conf/locale/no/__init__.py
  72. +34 −0 django/conf/locale/no/formats.py
  73. 0  django/conf/locale/pl/__init__.py
  74. +18 −0 django/conf/locale/pl/formats.py
  75. 0  django/conf/locale/pt/__init__.py
  76. +18 −0 django/conf/locale/pt/formats.py
  77. 0  django/conf/locale/pt_BR/__init__.py
  78. +35 −0 django/conf/locale/pt_BR/formats.py
  79. 0  django/conf/locale/ro/__init__.py
  80. +18 −0 django/conf/locale/ro/formats.py
  81. 0  django/conf/locale/ru/__init__.py
  82. +18 −0 django/conf/locale/ru/formats.py
  83. 0  django/conf/locale/sk/__init__.py
  84. +18 −0 django/conf/locale/sk/formats.py
  85. 0  django/conf/locale/sl/__init__.py
  86. +18 −0 django/conf/locale/sl/formats.py
  87. 0  django/conf/locale/sr/__init__.py
  88. +44 −0 django/conf/locale/sr/formats.py
  89. 0  django/conf/locale/sr_Latn/__init__.py
  90. +44 −0 django/conf/locale/sr_Latn/formats.py
  91. 0  django/conf/locale/sv/__init__.py
  92. +18 −0 django/conf/locale/sv/formats.py
  93. 0  django/conf/locale/ta/__init__.py
  94. +18 −0 django/conf/locale/ta/formats.py
  95. 0  django/conf/locale/te/__init__.py
  96. +18 −0 django/conf/locale/te/formats.py
  97. 0  django/conf/locale/th/__init__.py
  98. +18 −0 django/conf/locale/th/formats.py
  99. 0  django/conf/locale/tr/__init__.py
  100. +18 −0 django/conf/locale/tr/formats.py
  101. 0  django/conf/locale/uk/__init__.py
  102. +18 −0 django/conf/locale/uk/formats.py
  103. 0  django/conf/locale/zh_CN/__init__.py
  104. +18 −0 django/conf/locale/zh_CN/formats.py
  105. 0  django/conf/locale/zh_TW/__init__.py
  106. +18 −0 django/conf/locale/zh_TW/formats.py
  107. +3 −2 django/contrib/admin/media/js/calendar.js
  108. +1 −1  django/contrib/admin/templates/admin/object_history.html
  109. +18 −20 django/contrib/admin/templatetags/admin_list.py
  110. +4 −6 django/contrib/databrowse/datastructures.py
  111. +45 −32 django/forms/extras/widgets.py
  112. +28 −33 django/forms/fields.py
  113. +2 −1  django/forms/widgets.py
  114. +2 −0  django/template/__init__.py
  115. +4 −1 django/template/debug.py
  116. +13 −6 django/template/defaultfilters.py
  117. +97 −0 django/utils/formats.py
  118. +42 −0 django/utils/numberformat.py
  119. +21 −2 django/utils/translation/trans_null.py
  120. +53 −35 django/utils/translation/trans_real.py
  121. +26 −3 django/views/i18n.py
  122. +12 −0 docs/internals/deprecation.txt
  123. +205 −16 docs/ref/settings.txt
  124. +13 −4 docs/ref/templates/builtins.txt
  125. +45 −0 docs/releases/1.2.txt
  126. +64 −8 docs/topics/i18n.txt
  127. +0 −114 tests/regressiontests/i18n/misc.py
  128. +375 −72 tests/regressiontests/i18n/tests.py
View
74 django/conf/global_settings.py
@@ -103,6 +103,10 @@
LOCALE_PATHS = ()
LANGUAGE_COOKIE_NAME = 'django_language'
+# If you set this to True, Django will format dates, numbers and calendars
+# according to user current locale
+USE_L10N = False
+
# Not-necessarily-technical managers of the site. They get broken link
# notifications and other various e-mails.
MANAGERS = ADMINS
@@ -265,6 +269,12 @@
# you'd pass directly to os.chmod; see http://docs.python.org/lib/os-file-dir.html.
FILE_UPLOAD_PERMISSIONS = None
+# Python module path where user will place custom format definition.
+# The directory where this setting is pointing should contain subdirectories
+# named as the locales, containing a formats.py file
+# (i.e. "myproject.locale" for myproject/locale/en/formats.py etc. use)
+FORMAT_MODULE_PATH = None
+
# Default formatting for date objects. See all available format strings here:
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
DATE_FORMAT = 'N j, Y'
@@ -287,6 +297,70 @@
# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
MONTH_DAY_FORMAT = 'F j'
+# Default shortformatting for date objects. See all available format strings here:
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+SHORT_DATE_FORMAT = 'm/d/Y'
+
+# Default short formatting for datetime objects.
+# See all available format strings here:
+# http://docs.djangoproject.com/en/dev/ref/templates/builtins/#now
+SHORT_DATETIME_FORMAT = 'm/d/Y P'
+
+# Default formats to be used when parsing dates from input boxes, in order
+# See all available format string here:
+# http://docs.python.org/library/datetime.html#strftime-behavior
+# * Note that these format strings are different from the ones to display dates
+DATE_INPUT_FORMATS = (
+ '%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'
+)
+
+# Default formats to be used when parsing times from input boxes, in order
+# See all available format string here:
+# http://docs.python.org/library/datetime.html#strftime-behavior
+# * Note that these format strings are different from the ones to display dates
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+)
+
+# Default formats to be used when parsing dates and times from input boxes,
+# in order
+# See all available format string here:
+# http://docs.python.org/library/datetime.html#strftime-behavior
+# * Note that these format strings are different from the ones to display dates
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
+ '%m/%d/%Y %H:%M', # '10/25/2006 14:30'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
+ '%m/%d/%y %H:%M', # '10/25/06 14:30'
+ '%m/%d/%y', # '10/25/06'
+)
+
+# First day of week, to be used on calendars
+# 0 means Sunday, 1 means Monday...
+FIRST_DAY_OF_WEEK = 0
+
+# Decimal separator symbol
+DECIMAL_SEPARATOR = '.'
+
+# Boolean that sets whether to add thousand separator when formatting numbers
+USE_THOUSAND_SEPARATOR = False
+
+# Number of digits that will be togheter, when spliting them by THOUSAND_SEPARATOR
+# 0 means no grouping, 3 means splitting by thousands...
+NUMBER_GROUPING = 0
+
+# Thousand separator symbol
+THOUSAND_SEPARATOR = ','
+
# Do you want to manage transactions manually?
# Hint: you really don't!
TRANSACTIONS_MANAGED = False
View
0  django/conf/locale/__init__.py
No changes.
View
0  django/conf/locale/ar/__init__.py
No changes.
View
18 django/conf/locale/ar/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F، Y'
+TIME_FORMAT = 'g:i:s A'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd‏/m‏/Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/bg/__init__.py
No changes.
View
18 django/conf/locale/bg/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd.m.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/bn/__init__.py
No changes.
View
18 django/conf/locale/bn/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F, Y'
+TIME_FORMAT = 'g:i:s 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_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+# NUMBER_GROUPING =
View
0  django/conf/locale/ca/__init__.py
No changes.
View
30 django/conf/locale/ca/formats.py
@@ -0,0 +1,30 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j \de F \de Y'
+TIME_FORMAT = 'G:i:s'
+DATETIME_FORMAT = 'j \de F \de Y \\a \le\s G:i'
+YEAR_MONTH_FORMAT = 'F \de\l Y'
+MONTH_DAY_FORMAT = 'j \de F'
+SHORT_DATE_FORMAT = 'd/m/Y'
+SHORT_DATETIME_FORMAT = 'd/m/Y G:i'
+FIRST_DAY_OF_WEEK = 1 # Monday
+DATE_INPUT_FORMATS = (
+ # '31/12/2009', '31/12/09'
+ '%d/%m/%Y', '%d/%m/%y'
+)
+TIME_INPUT_FORMATS = (
+ # '14:30:59', '14:30'
+ '%H:%M:%S', '%H:%M'
+)
+DATETIME_INPUT_FORMATS = (
+ '%d/%m/%Y %H:%M:%S',
+ '%d/%m/%Y %H:%M',
+ '%d/%m/%y %H:%M:%S',
+ '%d/%m/%y %H:%M',
+)
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+NUMBER_GROUPING = 3
+
View
0  django/conf/locale/cs/__init__.py
No changes.
View
18 django/conf/locale/cs/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j. F Y'
+TIME_FORMAT = 'G:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'j.n.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/cy/__init__.py
No changes.
View
18 django/conf/locale/cy/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd F Y'
+TIME_FORMAT = 'g:i:s A'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+# MONTH_DAY_FORMAT =
+SHORT_DATE_FORMAT = 'j M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+# DECIMAL_SEPARATOR =
+# THOUSAND_SEPARATOR =
+# NUMBER_GROUPING =
View
0  django/conf/locale/da/__init__.py
No changes.
View
26 django/conf/locale/da/formats.py
@@ -0,0 +1,26 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+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 = 1
+DATE_INPUT_FORMATS = (
+ '%d.%m.%Y', # '25.10.2006'
+)
+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:30'
+)
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+NUMBER_GROUPING = 3
View
0  django/conf/locale/de/__init__.py
No changes.
View
32 django/conf/locale/de/formats.py
@@ -0,0 +1,32 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j. F Y'
+TIME_FORMAT = 'H:i:s'
+DATETIME_FORMAT = 'j. F Y H:i:s'
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'd.m.Y'
+SHORT_DATETIME_FORMAT = 'd.m.Y H:i:s'
+FIRST_DAY_OF_WEEK = 1 # Monday
+DATE_INPUT_FORMATS = (
+ '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
+ '%Y-%m-%d', '%y-%m-%d', # '2006-10-25', '06-10-25'
+ '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
+)
+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:30'
+ '%d.%m.%Y', # '25.10.2006'
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+)
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+NUMBER_GROUPING = 3
View
0  django/conf/locale/el/__init__.py
No changes.
View
18 django/conf/locale/el/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd F Y'
+TIME_FORMAT = 'g:i:s A'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/en/__init__.py
No changes.
View
38 django/conf/locale/en/formats.py
@@ -0,0 +1,38 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+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 = 'm/d/Y'
+SHORT_DATETIME_FORMAT = 'm/d/Y P'
+FIRST_DAY_OF_WEEK = 0 # Sunday
+DATE_INPUT_FORMATS = (
+ '%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'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
+ '%m/%d/%Y %H:%M', # '10/25/2006 14:30'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
+ '%m/%d/%y %H:%M', # '10/25/06 14:30'
+ '%m/%d/%y', # '10/25/06'
+)
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+NUMBER_GROUPING = 3
+
View
0  django/conf/locale/es/__init__.py
No changes.
View
30 django/conf/locale/es/formats.py
@@ -0,0 +1,30 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j \de F \de Y'
+TIME_FORMAT = 'H:i:s'
+DATETIME_FORMAT = 'j \de F \de Y \a \l\a\s H:i'
+YEAR_MONTH_FORMAT = 'F \de Y'
+MONTH_DAY_FORMAT = 'j \de F'
+SHORT_DATE_FORMAT = 'd/m/Y'
+SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
+FIRST_DAY_OF_WEEK = 1 # Monday
+DATE_INPUT_FORMATS = (
+ # '31/12/2009', '31/12/09'
+ '%d/%m/%Y', '%d/%m/%y'
+)
+TIME_INPUT_FORMATS = (
+ # '14:30:59', '14:30'
+ '%H:%M:%S', '%H:%M'
+)
+DATETIME_INPUT_FORMATS = (
+ '%d/%m/%Y %H:%M:%S',
+ '%d/%m/%Y %H:%M',
+ '%d/%m/%y %H:%M:%S',
+ '%d/%m/%y %H:%M',
+)
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+NUMBER_GROUPING = 3
+
View
0  django/conf/locale/es_AR/__init__.py
No changes.
View
18 django/conf/locale/es_AR/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+# DATE_FORMAT =
+# TIME_FORMAT =
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+# MONTH_DAY_FORMAT =
+# SHORT_DATE_FORMAT =
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+# DECIMAL_SEPARATOR =
+# THOUSAND_SEPARATOR =
+# NUMBER_GROUPING =
View
0  django/conf/locale/et/__init__.py
No changes.
View
18 django/conf/locale/et/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'G:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd.m.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/eu/__init__.py
No changes.
View
18 django/conf/locale/eu/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'Yeko M\re\n d\a'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+# MONTH_DAY_FORMAT =
+SHORT_DATE_FORMAT = 'Y M j'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/fa/__init__.py
No changes.
View
18 django/conf/locale/fa/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'G:i:s'
+DATETIME_FORMAT = 'j F Y، ساعت G:i:s'
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'Y/n/j'
+SHORT_DATETIME_FORMAT = 'Y/n/j،‏ G:i:s'
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/fi/__init__.py
No changes.
View
18 django/conf/locale/fi/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j. F Y'
+TIME_FORMAT = 'G.i.s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'j.n.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/fr/__init__.py
No changes.
View
18 django/conf/locale/fr/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'H:i:s'
+DATETIME_FORMAT = 'j F Y H:i:s'
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+SHORT_DATETIME_FORMAT = 'j M Y H:i:s'
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/ga/__init__.py
No changes.
View
18 django/conf/locale/ga/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+# NUMBER_GROUPING =
View
0  django/conf/locale/gl/__init__.py
No changes.
View
18 django/conf/locale/gl/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M, Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/he/__init__.py
No changes.
View
18 django/conf/locale/he/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j בF Y'
+TIME_FORMAT = 'H:i:s'
+DATETIME_FORMAT = 'j בF Y H:i:s'
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j בF'
+SHORT_DATE_FORMAT = 'd/m/Y'
+SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s'
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+# NUMBER_GROUPING =
View
0  django/conf/locale/hi/__init__.py
No changes.
View
18 django/conf/locale/hi/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'g:i:s A'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd-m-Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+# NUMBER_GROUPING =
View
0  django/conf/locale/hr/__init__.py
No changes.
View
18 django/conf/locale/hr/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j. F Y.'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y.'
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'j.n.Y.'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/hu/__init__.py
No changes.
View
18 django/conf/locale/hu/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'Y. F j.'
+TIME_FORMAT = 'G:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'F j.'
+SHORT_DATE_FORMAT = 'Y.m.d.'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/is/__init__.py
No changes.
View
18 django/conf/locale/is/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j. F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'j.n.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/it/__init__.py
No changes.
View
18 django/conf/locale/it/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd F Y'
+TIME_FORMAT = 'H.i.s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd/M/Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/ja/__init__.py
No changes.
View
18 django/conf/locale/ja/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'Y年n月j日'
+TIME_FORMAT = 'G:i:s'
+DATETIME_FORMAT = 'Y年n月j日G:i:s'
+YEAR_MONTH_FORMAT = 'Y年n月'
+MONTH_DAY_FORMAT = 'n月j日'
+SHORT_DATE_FORMAT = 'Y/m/d'
+SHORT_DATETIME_FORMAT = 'Y/m/d G:i:s'
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+# NUMBER_GROUPING =
View
0  django/conf/locale/ka/__init__.py
No changes.
View
42 django/conf/locale/ka/formats.py
@@ -0,0 +1,42 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'l, j F, Y'
+TIME_FORMAT = 'h:i:s a'
+DATETIME_FORMAT = 'j F, Y h:i:s a'
+YEAR_MONTH_FORMAT = 'F, Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j.M.Y'
+SHORT_DATETIME_FORMAT = 'j.M.Y H:i:s'
+FIRST_DAY_OF_WEEK = 1 # (Monday)
+DATE_INPUT_FORMATS = (
+ '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
+ '%d %b %Y', '%d %b, %Y', '%d %b. %Y', # '25 Oct 2006', '25 Oct, 2006', '25 Oct. 2006'
+ '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006'
+ '%d.%m.%Y', '%d.%m.%y', # '25.10.2006', '25.10.06'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y %H:%M:%S', # '25.10.2006 14:30:59'
+ '%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', # '25.10.06 14:30'
+ '%d.%m.%y', # '25.10.06'
+ '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
+ '%m/%d/%Y %H:%M', # '10/25/2006 14:30'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
+ '%m/%d/%y %H:%M', # '10/25/06 14:30'
+ '%m/%d/%y', # '10/25/06'
+)
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = " "
+NUMBER_GROUPING = 3
View
0  django/conf/locale/km/__init__.py
No changes.
View
18 django/conf/locale/km/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j ខែ F ឆ្នាំ Y'
+TIME_FORMAT = 'G:i:s'
+DATETIME_FORMAT = 'j ខែ F ឆ្នាំ Y, G:i:s'
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+SHORT_DATETIME_FORMAT = 'j M Y, G:i:s'
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/kn/__init__.py
No changes.
View
18 django/conf/locale/kn/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'h:i:s A'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+# DECIMAL_SEPARATOR =
+# THOUSAND_SEPARATOR =
+# NUMBER_GROUPING =
View
0  django/conf/locale/ko/__init__.py
No changes.
View
44 django/conf/locale/ko/formats.py
@@ -0,0 +1,44 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'Y년 n월 j일'
+TIME_FORMAT = 'A g:i:s'
+DATETIME_FORMAT = 'Y년 n월 j일 g:i:s A'
+YEAR_MONTH_FORMAT = 'Y년 F월'
+MONTH_DAY_FORMAT = 'F월 j일'
+SHORT_DATE_FORMAT = 'Y-n-j.'
+SHORT_DATETIME_FORMAT = 'Y-n-j H:i'
+# FIRST_DAY_OF_WEEK =
+DATE_INPUT_FORMATS = (
+ '%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일', with localized suffix.
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+ '%H%M%S', # '14시 30분 59초'
+ '%H%M', # '14시 30분'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59'
+ '%m/%d/%Y %H:%M', # '10/25/2006 14:30'
+ '%m/%d/%Y', # '10/25/2006'
+ '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59'
+ '%m/%d/%y %H:%M', # '10/25/06 14:30'
+ '%m/%d/%y', # '10/25/06'
+
+ '%Y%m%d%H%M%S', # '2006년 10월 25일 14시 30분 59초'
+ '%Y%m%d%H%M', # '2006년 10월 25일 14시 30분'
+)
+
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+NUMBER_GROUPING = 3
View
0  django/conf/locale/lt/__init__.py
No changes.
View
18 django/conf/locale/lt/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'Y \m. F j \d.'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+# MONTH_DAY_FORMAT =
+SHORT_DATE_FORMAT = 'Y.m.d'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/lv/__init__.py
No changes.
View
18 django/conf/locale/lv/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'Y. \g\a\d\a j. F'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'Y. \g. F'
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'Y. \g\a\d\a j. M'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/mk/__init__.py
No changes.
View
18 django/conf/locale/mk/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+# MONTH_DAY_FORMAT =
+SHORT_DATE_FORMAT = 'd.n.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/nl/__init__.py
No changes.
View
48 django/conf/locale/nl/formats.py
@@ -0,0 +1,48 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+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'
+SHORT_DATE_FORMAT = 'j-n-Y' # '20-1-2009'
+SHORT_DATETIME_FORMAT = 'j-n-Y H:i' # '20-1-2009 15:23'
+FIRST_DAY_OF_WEEK = 1 # Monday (in Dutch 'maandag')
+DATE_INPUT_FORMATS = (
+ '%d-%m-%Y', '%d-%m-%y', '%Y-%m-%d', # '20-01-2009', '20-01-09', '2009-01-20'
+ '%d %b %Y', '%d %b %y', # '20 jan 2009', '20 jan 09'
+ '%d %B %Y', '%d %B %y', # '20 januari 2009', '20 januari 09'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '15:23:35'
+ '%H.%M:%S', # '15.23:35'
+ '%H.%M', # '15.23'
+ '%H:%M', # '15:23'
+)
+DATETIME_INPUT_FORMATS = (
+ # With time in %H:%M:%S :
+ '%d-%m-%Y %H:%M:%S', '%d-%m-%y %H:%M:%S', '%Y-%m-%d %H:%M:%S', # '20-01-2009 15:23:35', '20-01-09 15:23:35', '2009-01-20 15:23:35'
+ '%d %b %Y %H:%M:%S', '%d %b %y %H:%M:%S', # '20 jan 2009 15:23:35', '20 jan 09 15:23:35'
+ '%d %B %Y %H:%M:%S', '%d %B %y %H:%M:%S', # '20 januari 2009 15:23:35', '20 januari 2009 15:23:35'
+ # With time in %H.%M:%S :
+ '%d-%m-%Y %H.%M:%S', '%d-%m-%y %H.%M:%S', # '20-01-2009 15.23:35', '20-01-09 15.23:35'
+ '%d %b %Y %H.%M:%S', '%d %b %y %H.%M:%S', # '20 jan 2009 15.23:35', '20 jan 09 15.23:35'
+ '%d %B %Y %H.%M:%S', '%d %B %y %H.%M:%S', # '20 januari 2009 15.23:35', '20 januari 2009 15.23:35'
+ # With time in %H:%M :
+ '%d-%m-%Y %H:%M', '%d-%m-%y %H:%M', '%Y-%m-%d %H:%M', # '20-01-2009 15:23', '20-01-09 15:23', '2009-01-20 15:23'
+ '%d %b %Y %H:%M', '%d %b %y %H:%M', # '20 jan 2009 15:23', '20 jan 09 15:23'
+ '%d %B %Y %H:%M', '%d %B %y %H:%M', # '20 januari 2009 15:23', '20 januari 2009 15:23'
+ # With time in %H.%M :
+ '%d-%m-%Y %H.%M', '%d-%m-%y %H.%M', # '20-01-2009 15.23', '20-01-09 15.23'
+ '%d %b %Y %H.%M', '%d %b %y %H.%M', # '20 jan 2009 15.23', '20 jan 09 15.23'
+ '%d %B %Y %H.%M', '%d %B %y %H.%M', # '20 januari 2009 15.23', '20 januari 2009 15.23'
+ # Without time :
+ '%d-%m-%Y', '%d-%m-%y', '%Y-%m-%d', # '20-01-2009', '20-01-09', '2009-01-20'
+ '%d %b %Y', '%d %b %y', # '20 jan 2009', '20 jan 09'
+ '%d %B %Y', '%d %B %y', # '20 januari 2009', '20 januari 2009'
+)
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+NUMBER_GROUPING = 3
View
0  django/conf/locale/no/__init__.py
No changes.
View
34 django/conf/locale/no/formats.py
@@ -0,0 +1,34 @@
+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 = 1 # Monday
+DATE_INPUT_FORMATS = (
+ '%Y-%m-%d', '%j.%m.%Y', '%j.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
+ '%Y-%m-%j', # '2006-10-25',
+ '%j. %b %Y', '%j %b %Y', # '25. okt 2006', '25 okt 2006'
+ '%j. %b. %Y', '%j %b. %Y', # '25. okt. 2006', '25 okt. 2006'
+ '%j. %B %Y', '%j %B %Y', # '25. oktober 2006', '25 oktober 2006'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%i:%S', # '14:30:59'
+ '%H:%i', # '14:30'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%i:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%i', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%Y-%m-%j', # '2006-10-25'
+ '%j.%m.%Y %H:%i:%S', # '25.10.2006 14:30:59'
+ '%j.%m.%Y %H:%i', # '25.10.2006 14:30'
+ '%j.%m.%Y', # '25.10.2006'
+ '%j.%m.%y %H:%i:%S', # '25.10.06 14:30:59'
+ '%j.%m.%y %H:%i', # '25.10.06 14:30'
+ '%j.%m.%y', # '25.10.06'
+)
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+NUMBER_GROUPING = 3
View
0  django/conf/locale/pl/__init__.py
No changes.
View
18 django/conf/locale/pl/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd-m-Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/pt/__init__.py
No changes.
View
18 django/conf/locale/pt/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j \de F \de Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F \de Y'
+MONTH_DAY_FORMAT = 'j \de F'
+SHORT_DATE_FORMAT = 'd/m/Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/pt_BR/__init__.py
No changes.
View
35 django/conf/locale/pt_BR/formats.py
@@ -0,0 +1,35 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j \\de N \\de Y'
+TIME_FORMAT = 'H:i'
+DATETIME_FORMAT = 'j \\de N \\de Y à\\s H:i'
+YEAR_MONTH_FORMAT = 'F \\de Y'
+MONTH_DAY_FORMAT = 'j \\de F'
+SHORT_DATE_FORMAT = 'd/m/Y'
+SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
+FIRST_DAY_OF_WEEK = 0 # Sunday
+DATE_INPUT_FORMATS = (
+ '%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06'
+ '%d de %b de %Y', '%d de %b, %Y', # '25 de Out de 2006', '25 Out, 2006'
+ '%d de %B de %Y', '%d de %B, %Y', # '25 de Outubro de 2006', '25 de Outubro, 2006'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d/%m/%Y %H:%M:%S', # '25/10/2006 14:30:59'
+ '%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', # '25/10/06 14:30'
+ '%d/%m/%y', # '25/10/06'
+)
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+NUMBER_GROUPING = 3
View
0  django/conf/locale/ro/__init__.py
No changes.
View
18 django/conf/locale/ro/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'H:i:s'
+DATETIME_FORMAT = 'j F Y, H:i:s'
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd.m.Y'
+SHORT_DATETIME_FORMAT = 'd.m.Y, H:i:s'
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/ru/__init__.py
No changes.
View
18 django/conf/locale/ru/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y г.'
+TIME_FORMAT = 'G:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'd.m.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/sk/__init__.py
No changes.
View
18 django/conf/locale/sk/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j. F Y'
+TIME_FORMAT = 'G:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'j.n.Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/sl/__init__.py
No changes.
View
18 django/conf/locale/sl/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd. F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j. F'
+SHORT_DATE_FORMAT = 'j. M. Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/sr/__init__.py
No changes.
View
44 django/conf/locale/sr/formats.py
@@ -0,0 +1,44 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+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.m.Y.'
+SHORT_DATETIME_FORMAT = 'j.m.Y. H:i'
+FIRST_DAY_OF_WEEK = 1
+DATE_INPUT_FORMATS = (
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
+ '%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
+ '%d. %b %y.', '%d. %B %y.', # '25. Oct 06.', '25. October 06.'
+ '%d. %b \'%y.', '%d. %B \'%y.', # '25. Oct '06.', '25. October '06.'
+ '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 2006.'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59'
+ '%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', # '25.10.06. 14:30'
+ '%d.%m.%y.', # '25.10.06.'
+ '%d. %m. %Y. %H:%M:%S', # '25. 10. 2006. 14:30:59'
+ '%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', # '25. 10. 06. 14:30'
+ '%d. %m. %y.', # '25. 10. 06.'
+)
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+NUMBER_GROUPING = 3
View
0  django/conf/locale/sr_Latn/__init__.py
No changes.
View
44 django/conf/locale/sr_Latn/formats.py
@@ -0,0 +1,44 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+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.m.Y.'
+SHORT_DATETIME_FORMAT = 'j.m.Y. H:i'
+FIRST_DAY_OF_WEEK = 1
+DATE_INPUT_FORMATS = (
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
+ '%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '25. 10. 06.'
+ '%d. %b %y.', '%d. %B %y.', # '25. Oct 06.', '25. October 06.'
+ '%d. %b \'%y.', '%d. %B \'%y.', # '25. Oct '06.', '25. October '06.'
+ '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 2006.'
+)
+TIME_INPUT_FORMATS = (
+ '%H:%M:%S', # '14:30:59'
+ '%H:%M', # '14:30'
+)
+DATETIME_INPUT_FORMATS = (
+ '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
+ '%Y-%m-%d %H:%M', # '2006-10-25 14:30'
+ '%Y-%m-%d', # '2006-10-25'
+ '%d.%m.%Y. %H:%M:%S', # '25.10.2006. 14:30:59'
+ '%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', # '25.10.06. 14:30'
+ '%d.%m.%y.', # '25.10.06.'
+ '%d. %m. %Y. %H:%M:%S', # '25. 10. 2006. 14:30:59'
+ '%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', # '25. 10. 06. 14:30'
+ '%d. %m. %y.', # '25. 10. 06.'
+)
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+NUMBER_GROUPING = 3
View
0  django/conf/locale/sv/__init__.py
No changes.
View
18 django/conf/locale/sv/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'H.i.s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'Y F'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/ta/__init__.py
No changes.
View
18 django/conf/locale/ta/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F, Y'
+TIME_FORMAT = 'g:i:s A'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M, Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+# DECIMAL_SEPARATOR =
+# THOUSAND_SEPARATOR =
+# NUMBER_GROUPING =
View
0  django/conf/locale/te/__init__.py
No changes.
View
18 django/conf/locale/te/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'g:i:s A'
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+# DECIMAL_SEPARATOR =
+# THOUSAND_SEPARATOR =
+# NUMBER_GROUPING =
View
0  django/conf/locale/th/__init__.py
No changes.
View
18 django/conf/locale/th/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y'
+TIME_FORMAT = 'G:i:s'
+DATETIME_FORMAT = 'j F Y, G:i:s'
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+SHORT_DATETIME_FORMAT = 'j M Y, G:i:s'
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
+# NUMBER_GROUPING =
View
0  django/conf/locale/tr/__init__.py
No changes.
View
18 django/conf/locale/tr/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'd F Y'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'd F'
+SHORT_DATE_FORMAT = 'd M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = '.'
+# NUMBER_GROUPING =
View
0  django/conf/locale/uk/__init__.py
No changes.
View
18 django/conf/locale/uk/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+DATE_FORMAT = 'j F Y р.'
+TIME_FORMAT = 'H:i:s'
+# DATETIME_FORMAT =
+YEAR_MONTH_FORMAT = 'F Y'
+MONTH_DAY_FORMAT = 'j F'
+SHORT_DATE_FORMAT = 'j M Y'
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+DECIMAL_SEPARATOR = ','
+THOUSAND_SEPARATOR = ' '
+# NUMBER_GROUPING =
View
0  django/conf/locale/zh_CN/__init__.py
No changes.
View
18 django/conf/locale/zh_CN/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+# DATE_FORMAT =
+# TIME_FORMAT =
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+# MONTH_DAY_FORMAT =
+# SHORT_DATE_FORMAT =
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+# DECIMAL_SEPARATOR =
+# THOUSAND_SEPARATOR =
+# NUMBER_GROUPING =
View
0  django/conf/locale/zh_TW/__init__.py
No changes.
View
18 django/conf/locale/zh_TW/formats.py
@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+# This file is distributed under the same license as the Django package.
+#
+
+# DATE_FORMAT =
+# TIME_FORMAT =
+# DATETIME_FORMAT =
+# YEAR_MONTH_FORMAT =
+# MONTH_DAY_FORMAT =
+# SHORT_DATE_FORMAT =
+# SHORT_DATETIME_FORMAT =
+# FIRST_DAY_OF_WEEK =
+# DATE_INPUT_FORMATS =
+# TIME_INPUT_FORMATS =
+# DATETIME_INPUT_FORMATS =
+# DECIMAL_SEPARATOR =
+# THOUSAND_SEPARATOR =
+# NUMBER_GROUPING =
View
5 django/contrib/admin/media/js/calendar.js
@@ -25,6 +25,7 @@ function quickElement() {
var CalendarNamespace = {
monthsOfYear: gettext('January February March April May June July August September October November December').split(' '),
daysOfWeek: gettext('S M T W T F S').split(' '),
+ firstDayOfWeek: parseInt(gettext('FIRST_DAY_OF_WEEK')),
isLeapYear: function(year) {
return (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0));
},
@@ -56,10 +57,10 @@ var CalendarNamespace = {
// Draw days-of-week header
var tableRow = quickElement('tr', tableBody);
for (var i = 0; i < 7; i++) {
- quickElement('th', tableRow, CalendarNamespace.daysOfWeek[i]);
+ quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]);
}
- var startingPos = new Date(year, month-1, 1).getDay();
+ var startingPos = new Date(year, month-1, 1 - CalendarNamespace.firstDayOfWeek).getDay();
var days = CalendarNamespace.getDaysInMonth(month, year);
// Draw blanks before first of month
View
2  django/contrib/admin/templates/admin/object_history.html
@@ -27,7 +27,7 @@
<tbody>
{% for action in action_list %}
<tr>
- <th scope="row">{{ action.action_time|date:_("DATETIME_FORMAT") }}</th>
+ <th scope="row">{{ action.action_time|date }}</th>
<td>{{ action.user.username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
<td>{{ action.change_message }}</td>
</tr>
View
38 django/contrib/admin/templatetags/admin_list.py
@@ -3,11 +3,11 @@
from django.contrib.admin.views.main import ORDER_VAR, ORDER_TYPE_VAR, PAGE_VAR, SEARCH_VAR
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
-from django.utils import dateformat
+from django.utils import formats
from django.utils.html import escape, conditional_escape
from django.utils.text import capfirst
from django.utils.safestring import mark_safe
-from django.utils.translation import get_date_formats, get_partial_date_formats, ugettext as _
+from django.utils.translation import ugettext as _
from django.utils.encoding import smart_unicode, smart_str, force_unicode
from django.template import Library
import datetime
@@ -189,25 +189,24 @@ def items_for_result(cl, result, form):
# Dates and times are special: They're formatted in a certain way.
elif isinstance(f, models.DateField) or isinstance(f, models.TimeField):
if field_val:
- (date_format, datetime_format, time_format) = get_date_formats()
- if isinstance(f, models.DateTimeField):
- result_repr = capfirst(dateformat.format(field_val, datetime_format))
- elif isinstance(f, models.TimeField):
- result_repr = capfirst(dateformat.time_format(field_val, time_format))
- else:
- result_repr = capfirst(dateformat.format(field_val, date_format))
+ result_repr = formats.localize(field_val)
+ else:
+ result_repr = EMPTY_CHANGELIST_VALUE
+ elif isinstance(f, models.DecimalField):
+ if field_val:
+ result_repr = formats.number_format(field_val, f.decimal_places)
+ else:
+ result_repr = EMPTY_CHANGELIST_VALUE
+ row_class = ' class="nowrap"'
+ elif isinstance(f, models.FloatField):
+ if field_val:
+ result_repr = formats.number_format(field_val)
else:
result_repr = EMPTY_CHANGELIST_VALUE
row_class = ' class="nowrap"'
# Booleans are special: We use images.
elif isinstance(f, models.BooleanField) or isinstance(f, models.NullBooleanField):
result_repr = _boolean_icon(field_val)
- # DecimalFields are special: Zero-pad the decimals.
- elif isinstance(f, models.DecimalField):
- if field_val is not None:
- result_repr = ('%%.%sf' % f.decimal_places) % field_val
- else:
- result_repr = EMPTY_CHANGELIST_VALUE
# Fields with choices are special: Use the representation
# of the choice.
elif f.flatchoices:
@@ -268,7 +267,6 @@ def date_hierarchy(cl):
year_lookup = cl.params.get(year_field)
month_lookup = cl.params.get(month_field)
day_lookup = cl.params.get(day_field)
- year_month_format, month_day_format = get_partial_date_formats()
link = lambda d: cl.get_query_string(d, [field_generic])
@@ -278,9 +276,9 @@ def date_hierarchy(cl):
'show': True,
'back': {
'link': link({year_field: year_lookup, month_field: month_lookup}),
- 'title': dateformat.format(day, year_month_format)
+ 'title': capfirst(formats.date_format(day, 'YEAR_MONTH_FORMAT'))
},
- 'choices': [{'title': dateformat.format(day, month_day_format)}]
+ 'choices': [{'title': capfirst(formats.date_format(day, 'MONTH_DAY_FORMAT'))}]
}
elif year_lookup and month_lookup:
days = cl.query_set.filter(**{year_field: year_lookup, month_field: month_lookup}).dates(field_name, 'day')
@@ -292,7 +290,7 @@ def date_hierarchy(cl):
},
'choices': [{
'link': link({year_field: year_lookup, month_field: month_lookup, day_field: day.day}),
- 'title': dateformat.format(day, month_day_format)
+ 'title': capfirst(formats.date_format(day, 'MONTH_DAY_FORMAT'))
} for day in days]
}
elif year_lookup:
@@ -305,7 +303,7 @@ def date_hierarchy(cl):
},
'choices': [{
'link': link({year_field: year_lookup, month_field: month.month}),
- 'title': dateformat.format(month, year_month_format)
+ 'title': capfirst(formats.date_format(month, 'YEAR_MONTH_FORMAT'))
} for month in months]
}
else:
View
10 django/contrib/databrowse/datastructures.py
@@ -4,9 +4,8 @@
"""
from django.db import models
-from django.utils import dateformat
+from django.utils import formats
from django.utils.text import capfirst
-from django.utils.translation import get_date_formats
from django.utils.encoding import smart_unicode, smart_str, iri_to_uri
from django.utils.safestring import mark_safe
from django.db.models.query import QuerySet
@@ -156,13 +155,12 @@ def values(self):
objs = dict(self.field.choices).get(self.raw_value, EMPTY_VALUE)
elif isinstance(self.field, models.DateField) or isinstance(self.field, models.TimeField):
if self.raw_value:
- date_format, datetime_format, time_format = get_date_formats()
if isinstance(self.field, models.DateTimeField):
- objs = capfirst(dateformat.format(self.raw_value, datetime_format))
+ objs = capfirst(formats.date_format(self.raw_value, 'DATETIME_FORMAT'))
elif isinstance(self.field, models.TimeField):
- objs = capfirst(dateformat.time_format(self.raw_value, time_format))
+ objs = capfirst(formats.date_format(self.raw_value, 'TIME_FORMAT'))
else:
- objs = capfirst(dateformat.format(self.raw_value, date_format))
+ objs = capfirst(formats.date_format(self.raw_value, 'DATE_FORMAT'))
else:
objs = EMPTY_VALUE
elif isinstance(self.field, models.BooleanField) or isinstance(self.field, models.NullBooleanField):
View
77 django/forms/extras/widgets.py
@@ -8,6 +8,8 @@
from django.forms.widgets import Widget, Select
from django.utils.dates import MONTHS
from django.utils.safestring import mark_safe
+from django.utils.formats import get_format
+from django.conf import settings
__all__ = ('SelectDateWidget',)
@@ -45,38 +47,27 @@ def render(self, name, value, attrs=None):
if match:
year_val, month_val, day_val = [int(v) for v in match.groups()]
- output = []
-
- if 'id' in self.attrs:
- id_ = self.attrs['id']
- else:
- id_ = 'id_%s' % name
-
- month_choices = MONTHS.items()
- if not (self.required and value):
- month_choices.append(self.none_value)
- month_choices.sort()
- local_attrs = self.build_attrs(id=self.month_field % id_)
- s = Select(choices=month_choices)
- select_html = s.render(self.month_field % name, month_val, local_attrs)
- output.append(select_html)
-
- day_choices = [(i, i) for i in range(1, 32)]
- if not (self.required and value):
- day_choices.insert(0, self.none_value)
- local_attrs['id'] = self.day_field % id_
- s = Select(choices=day_choices)
- select_html = s.render(self.day_field % name, day_val, local_attrs)
- output.append(select_html)
-
- year_choices = [(i, i) for i in self.years]
- if not (self.required and value):
- year_choices.insert(0, self.none_value)
- local_attrs['id'] = self.year_field % id_
- s = Select(choices=year_choices)
- select_html = s.render(self.year_field % name, year_val, local_attrs)
- output.append(select_html)
+ choices = [(i, i) for i in self.years]
+ year_html = self.create_select(name, self.year_field, value, year_val, choices)
+ choices = MONTHS.items()
+ month_html = self.create_select(name, self.month_field, value, month_val, choices)
+ choices = [(i, i) for i in range(1, 32)]
+ day_html = self.create_select(name, self.day_field, value, day_val, choices)
+ format = get_format('DATE_FORMAT')
+ escaped = False
+ output = []
+ for char in format:
+ if escaped:
+ escaped = False
+ elif char == '\\':
+ escaped = True
+ elif char in 'Yy':
+ output.append(year_html)
+ elif char in 'bFMmNn':
+ output.append(month_html)
+ elif char in 'dj':
+ output.append(day_html)
return mark_safe(u'\n'.join(output))
def id_for_label(self, id_):
@@ -90,5 +81,27 @@ def value_from_datadict(self, data, files, name):
if y == m == d == "0":
return None
if y and m and d:
- return '%s-%s-%s' % (y, m, d)
+ if settings.USE_L10N:
+ input_format = get_format('DATE_INPUT_FORMATS')[0]
+ try:
+ date_value = datetime.date(int(y), int(m), int(d))
+ except ValueError:
+ pass
+ else:
+ return date_value.strftime(input_format)
+ else:
+ return '%s-%s-%s' % (y, m, d)
return data.get(name, None)
+
+ def create_select(self, name, field, value, val, choices):
+ if 'id' in self.attrs:
+ id_ = self.attrs['id']
+ else:
+ id_ = 'id_%s' % name
+ if not (self.required and value):
+ choices.insert(0, self.none_value)
+ local_attrs = self.build_attrs(id=field % id_)
+ s = Select(choices=choices)
+ select_html = s.render(field % name, val, local_attrs)
+ return select_html
+
View
61 django/forms/fields.py
@@ -7,6 +7,7 @@
import re
import time
import urlparse
+import warnings
from decimal import Decimal, DecimalException
try:
from cStringIO import StringIO
@@ -17,6 +18,7 @@
import django.utils.copycompat as copy
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode, smart_str
+from django.utils.formats import get_format
from util import ErrorList, ValidationError
from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, FileInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple, DateInput, DateTimeInput, TimeInput, SplitDateTimeWidget, SplitHiddenDateTimeWidget
@@ -36,6 +38,20 @@
# These values, if given to to_python(), will trigger the self.required check.
EMPTY_VALUES = (None, '')
+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),
+ PendingDeprecationWarning
+ )
+ return getattr(formats, name)
+
+DEFAULT_DATE_INPUT_FORMATS = en_format('DATE_INPUT_FORMATS')
+DEFAULT_TIME_INPUT_FORMATS = en_format('TIME_INPUT_FORMATS')
+DEFAULT_DATETIME_INPUT_FORMATS = en_format('DATETIME_INPUT_FORMATS')
class Field(object):
widget = TextInput # Default widget to use when rendering this type of Field.
@@ -200,7 +216,9 @@ def clean(self, value):
if not self.required and value in EMPTY_VALUES:
return None
try:
- value = float(value)
+ # We always accept dot as decimal separator
+ if isinstance(value, str) or isinstance(value, unicode):
+ value = float(value.replace(get_format('DECIMAL_SEPARATOR'), '.'))
except (ValueError, TypeError):
raise ValidationError(self.error_messages['invalid'])
if self.max_value is not None and value > self.max_value:
@@ -236,7 +254,9 @@ def clean(self, value):
return None
value = smart_str(value).strip()
try:
- value = Decimal(value)
+ # We always accept dot as decimal separator
+ if isinstance(value, str) or isinstance(value, unicode):
+ value = Decimal(value.replace(get_format('DECIMAL_SEPARATOR'), '.'))
except DecimalException:
raise ValidationError(self.error_messages['invalid'])
@@ -264,14 +284,6 @@ def clean(self, value):
raise ValidationError(self.error_messages['max_whole_digits'] % (self.max_digits - self.decimal_places))
return value
-DEFAULT_DATE_INPUT_FORMATS = (
- '%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'
-)
-
class DateField(Field):
widget = DateInput
default_error_messages = {
@@ -280,7 +292,7 @@ class DateField(Field):
def __init__(self, input_formats=None, *args, **kwargs):
super(DateField, self).__init__(*args, **kwargs)
- self.input_formats = input_formats or DEFAULT_DATE_INPUT_FORMATS
+ self.input_formats = input_formats
def clean(self, value):
"""
@@ -294,18 +306,13 @@ def clean(self, value):
return value.date()
if isinstance(value, datetime.date):
return value
- for format in self.input_formats:
+ for format in self.input_formats or get_format('DATE_INPUT_FORMATS'):
try:
return datetime.date(*time.strptime(value, format)[:3])
except ValueError:
continue
raise ValidationError(self.error_messages['invalid'])
-DEFAULT_TIME_INPUT_FORMATS = (
- '%H:%M:%S', # '14:30:59'
- '%H:%M', # '14:30'