Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed all E261 warnings

  • Loading branch information...
commit 8eec2d93b6e93b8a1107fb3de2acd68d6994d6ec 1 parent c379146
@coagulant coagulant authored jasonamyers committed
Showing with 630 additions and 630 deletions.
  1. +1 −1  django/conf/__init__.py
  2. +6 −6 django/conf/global_settings.py
  3. +1 −1  django/conf/locale/bg/formats.py
  4. +1 −1  django/conf/locale/ca/formats.py
  5. +6 −6 django/conf/locale/cs/formats.py
  6. +2 −2 django/conf/locale/de/formats.py
  7. +3 −3 django/conf/locale/de_CH/formats.py
  8. +2 −2 django/conf/locale/en/formats.py
  9. +1 −1  django/conf/locale/es/formats.py
  10. +3 −3 django/conf/locale/es_AR/formats.py
  11. +1 −1  django/conf/locale/es_MX/formats.py
  12. +1 −1  django/conf/locale/es_NI/formats.py
  13. +1 −1  django/conf/locale/es_PR/formats.py
  14. +1 −1  django/conf/locale/et/formats.py
  15. +1 −1  django/conf/locale/fi/formats.py
  16. +12 −12 django/conf/locale/fr/formats.py
  17. +1 −1  django/conf/locale/gl/formats.py
  18. +20 −20 django/conf/locale/hr/formats.py
  19. +5 −5 django/conf/locale/hu/formats.py
  20. +8 −8 django/conf/locale/it/formats.py
  21. +1 −1  django/conf/locale/ka/formats.py
  22. +1 −1  django/conf/locale/ko/formats.py
  23. +1 −1  django/conf/locale/lt/formats.py
  24. +2 −2 django/conf/locale/lv/formats.py
  25. +16 −16 django/conf/locale/mk/formats.py
  26. +2 −2 django/conf/locale/ml/formats.py
  27. +3 −3 django/conf/locale/nb/formats.py
  28. +3 −3 django/conf/locale/nn/formats.py
  29. +5 −5 django/conf/locale/pl/formats.py
  30. +1 −1  django/conf/locale/pt/formats.py
  31. +1 −1  django/conf/locale/pt_BR/formats.py
  32. +9 −9 django/conf/locale/ru/formats.py
  33. +6 −6 django/conf/locale/sk/formats.py
  34. +16 −16 django/conf/locale/sr/formats.py
  35. +16 −16 django/conf/locale/sr_Latn/formats.py
  36. +1 −1  django/conf/locale/sv/formats.py
  37. +5 −5 django/conf/locale/tr/formats.py
  38. +3 −3 django/contrib/admin/helpers.py
  39. +1 −1  django/contrib/admin/options.py
  40. +4 −4 django/contrib/admin/templatetags/admin_list.py
  41. +1 −1  django/contrib/admin/templatetags/admin_modify.py
  42. +6 −6 django/contrib/admin/utils.py
  43. +4 −4 django/contrib/admin/validation.py
  44. +4 −4 django/contrib/admin/views/main.py
  45. +1 −1  django/contrib/admin/widgets.py
  46. +1 −1  django/contrib/contenttypes/generic.py
  47. +1 −1  django/contrib/flatpages/middleware.py
  48. +3 −3 django/contrib/formtools/preview.py
  49. +3 −3 django/contrib/gis/db/backends/mysql/operations.py
  50. +3 −3 django/contrib/gis/db/backends/oracle/operations.py
  51. +1 −1  django/contrib/gis/db/backends/postgis/operations.py
  52. +3 −3 django/contrib/gis/db/backends/spatialite/operations.py
  53. +1 −1  django/contrib/gis/db/models/fields.py
  54. +2 −2 django/contrib/gis/db/models/query.py
  55. +3 −3 django/contrib/gis/gdal/geometries.py
  56. +1 −1  django/contrib/gis/gdal/prototypes/ds.py
  57. +1 −1  django/contrib/gis/gdal/prototypes/geom.py
  58. +4 −4 django/contrib/gis/gdal/tests/test_ds.py
  59. +1 −1  django/contrib/gis/gdal/tests/test_envelope.py
  60. +19 −19 django/contrib/gis/gdal/tests/test_geom.py
  61. +2 −2 django/contrib/gis/gdal/tests/test_srs.py
  62. +3 −3 django/contrib/gis/geoip/tests.py
  63. +4 −4 django/contrib/gis/geos/linestring.py
  64. +1 −1  django/contrib/gis/geos/prototypes/errcheck.py
  65. +1 −1  django/contrib/gis/geos/prototypes/misc.py
  66. +28 −28 django/contrib/gis/geos/tests/test_geos.py
  67. +3 −3 django/contrib/gis/geos/tests/test_mutable_list.py
  68. +3 −3 django/contrib/gis/maps/google/gmap.py
  69. +7 −7 django/contrib/gis/maps/google/zoom.py
  70. +4 −4 django/contrib/gis/tests/distapp/tests.py
  71. +4 −4 django/contrib/gis/tests/geoapp/models.py
  72. +2 −2 django/contrib/gis/tests/geoapp/test_feeds.py
  73. +1 −1  django/contrib/gis/tests/geoapp/test_sitemaps.py
  74. +12 −12 django/contrib/gis/tests/geoapp/tests.py
  75. +2 −2 django/contrib/gis/tests/geogapp/tests.py
  76. +3 −3 django/contrib/gis/tests/layermap/models.py
  77. +5 −5 django/contrib/gis/tests/layermap/tests.py
  78. +2 −2 django/contrib/gis/tests/test_spatialrefsys.py
  79. +3 −3 django/contrib/gis/utils/layermapping.py
  80. +1 −1  django/contrib/messages/storage/cookie.py
  81. +1 −1  django/contrib/messages/tests/test_cookie.py
  82. +1 −1  django/contrib/sessions/models.py
  83. +1 −1  django/contrib/sessions/tests.py
  84. +1 −1  django/core/cache/backends/memcached.py
  85. +1 −1  django/core/files/uploadhandler.py
  86. +2 −2 django/core/handlers/base.py
  87. +1 −1  django/core/handlers/wsgi.py
  88. +3 −3 django/core/management/__init__.py
  89. +3 −3 django/core/management/commands/inspectdb.py
  90. +3 −3 django/core/urlresolvers.py
  91. +1 −1  django/core/validators.py
  92. +3 −3 django/db/backends/mysql/base.py
  93. +1 −1  django/db/backends/oracle/creation.py
  94. +2 −2 django/db/backends/oracle/introspection.py
  95. +1 −1  django/db/backends/postgresql_psycopg2/introspection.py
  96. +2 −2 django/db/backends/postgresql_psycopg2/operations.py
  97. +1 −1  django/db/backends/sqlite3/base.py
  98. +1 −1  django/db/backends/sqlite3/introspection.py
  99. +5 −5 django/db/backends/utils.py
  100. +1 −1  django/db/models/__init__.py
  101. +1 −1  django/db/models/base.py
  102. +1 −1  django/db/models/fields/__init__.py
  103. +4 −4 django/db/models/query.py
  104. +1 −1  django/db/models/sql/query.py
  105. +2 −2 django/http/multipartparser.py
  106. +7 −7 django/http/request.py
  107. +3 −3 django/middleware/cache.py
  108. +1 −1  django/templatetags/cache.py
  109. +8 −8 django/test/_doctest.py
  110. +2 −2 django/test/simple.py
  111. +33 −33 django/utils/dictconfig.py
  112. +1 −1  django/views/debug.py
  113. +1 −1  docs/conf.py
  114. +1 −1  setup.cfg
  115. +1 −1  tests/admin_changelist/admin.py
  116. +1 −1  tests/admin_filters/models.py
  117. +2 −2 tests/admin_filters/tests.py
  118. +1 −1  tests/admin_inlines/admin.py
  119. +1 −1  tests/admin_ordering/tests.py
  120. +4 −4 tests/admin_views/admin.py
  121. +2 −2 tests/admin_views/customadmin.py
  122. +1 −1  tests/admin_views/models.py
  123. +2 −2 tests/admin_widgets/tests.py
  124. +1 −1  tests/aggregation_regress/tests.py
  125. +3 −3 tests/cache/tests.py
  126. +3 −3 tests/comment_tests/tests/test_moderation_views.py
  127. +1 −1  tests/datatypes/tests.py
  128. +1 −1  tests/file_uploads/uploadhandler.py
  129. +1 −1  tests/forms_tests/tests/test_forms.py
  130. +70 −70 tests/forms_tests/tests/test_formsets.py
  131. +5 −5 tests/forms_tests/tests/test_input_formats.py
  132. +3 −3 tests/generic_inline_admin/tests.py
  133. +7 −7 tests/httpwrappers/tests.py
  134. +1 −1  tests/i18n/test_extraction.py
  135. +1 −1  tests/i18n/tests.py
  136. +1 −1  tests/invalid_models/invalid_models/models.py
  137. +2 −2 tests/m2m_and_m2o/tests.py
  138. +1 −1  tests/max_lengths/tests.py
  139. +6 −6 tests/model_forms/tests.py
  140. +55 −55 tests/model_formsets/tests.py
  141. +1 −1  tests/modeladmin/models.py
  142. +6 −6 tests/multiple_database/tests.py
  143. +1 −1  tests/null_fk/tests.py
  144. +1 −1  tests/queryset_pickle/tests.py
  145. +5 −5 tests/requests/tests.py
  146. +1 −1  tests/serializers_regress/tests.py
  147. +1 −1  tests/template_tests/filters.py
  148. +1 −1  tests/template_tests/tests.py
  149. +1 −1  tests/test_client/tests.py
  150. +3 −3 tests/test_client_regress/tests.py
  151. +1 −1  tests/view_tests/__init__.py
  152. +2 −2 tests/view_tests/tests/test_defaults.py
View
2  django/conf/__init__.py
@@ -36,7 +36,7 @@ def _setup(self, name=None):
"""
try:
settings_module = os.environ[ENVIRONMENT_VARIABLE]
- if not settings_module: # If it's set but is an empty string.
+ if not settings_module: # If it's set but is an empty string.
raise KeyError
except KeyError:
desc = ("setting %s" % name) if name else "settings"
View
12 django/conf/global_settings.py
@@ -302,7 +302,7 @@
# Maximum size, in bytes, of a request before it will be streamed to the
# file system instead of into memory.
-FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB
+FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB
# Directory in which upload streamed files will be temporarily saved. A value of
# `None` will make Django use the operating system's default temporary directory
@@ -360,11 +360,11 @@
# 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'
+ '%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
View
2  django/conf/locale/bg/formats.py
@@ -20,5 +20,5 @@
# TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING =
View
2  django/conf/locale/ca/formats.py
@@ -12,7 +12,7 @@
MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y G:i'
-FIRST_DAY_OF_WEEK = 1 # Monday
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
View
12 django/conf/locale/cs/formats.py
@@ -12,34 +12,34 @@
MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'd.m.Y'
SHORT_DATETIME_FORMAT = 'd.m.Y G:i:s'
-FIRST_DAY_OF_WEEK = 1 # Monday
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = (
'%d.%m.%Y', '%d.%m.%y', # '05.01.2006', '05.01.06'
- '%d. %m. %Y', '%d. %m. %y', # '5. 1. 2006', '5. 1. 06'
+ '%d. %m. %Y', '%d. %m. %y', # '5. 1. 2006', '5. 1. 06'
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '25. Oct. 2006'
)
# Kept ISO formats as one is in first position
TIME_INPUT_FORMATS = (
- '%H:%M:%S', # '04:30:59'
+ '%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.2006 04:30:59'
- '%d.%m.%Y %H:%M:%S.%f', # '05.01.2006 04:30:59.000200'
+ '%d.%m.%Y %H:%M:%S.%f', # '05.01.2006 04:30:59.000200'
'%d.%m.%Y %H.%M', # '05.01.2006 04.30'
'%d.%m.%Y %H:%M', # '05.01.2006 04:30'
'%d.%m.%Y', # '05.01.2006'
'%d. %m. %Y %H:%M:%S', # '05. 01. 2006 04:30:59'
- '%d. %m. %Y %H:%M:%S.%f', # '05. 01. 2006 04:30:59.000200'
+ '%d. %m. %Y %H:%M:%S.%f', # '05. 01. 2006 04:30:59.000200'
'%d. %m. %Y %H.%M', # '05. 01. 2006 04.30'
'%d. %m. %Y %H:%M', # '05. 01. 2006 04:30'
'%d. %m. %Y', # '05. 01. 2006'
'%Y-%m-%d %H.%M', # '2006-01-05 04.30'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
4 django/conf/locale/de/formats.py
@@ -12,7 +12,7 @@
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
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
@@ -22,7 +22,7 @@
)
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:%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'
)
View
6 django/conf/locale/de_CH/formats.py
@@ -13,7 +13,7 @@
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
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
@@ -23,7 +23,7 @@
)
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:%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'
)
@@ -34,5 +34,5 @@
# For details, please refer to http://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de
# (in German) and the documentation
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
4 django/conf/locale/en/formats.py
@@ -12,13 +12,13 @@
MONTH_DAY_FORMAT = 'F j'
SHORT_DATE_FORMAT = 'm/d/Y'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
-FIRST_DAY_OF_WEEK = 0 # Sunday
+FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
+ '%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'
View
2  django/conf/locale/es/formats.py
@@ -12,7 +12,7 @@
MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
-FIRST_DAY_OF_WEEK = 1 # Monday
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
View
6 django/conf/locale/es_AR/formats.py
@@ -12,13 +12,13 @@
MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = r'd/m/Y'
SHORT_DATETIME_FORMAT = r'd/m/Y H:i'
-FIRST_DAY_OF_WEEK = 0 # 0: Sunday, 1: Monday
+FIRST_DAY_OF_WEEK = 0 # 0: Sunday, 1: Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = (
- '%d/%m/%Y', # '31/12/2009'
- '%d/%m/%y', # '31/12/09'
+ '%d/%m/%Y', # '31/12/2009'
+ '%d/%m/%y', # '31/12/09'
)
DATETIME_INPUT_FORMATS = (
'%d/%m/%Y %H:%M:%S',
View
2  django/conf/locale/es_MX/formats.py
@@ -24,5 +24,5 @@
'%d/%m/%y %H:%M',
)
DECIMAL_SEPARATOR = '.' # ',' is also official (less common): NOM-008-SCFI-2002
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/es_NI/formats.py
@@ -10,7 +10,7 @@
MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
-FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
+FIRST_DAY_OF_WEEK = 1 # Monday: ISO 8601
DATE_INPUT_FORMATS = (
'%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
'%Y%m%d', # '20061025'
View
2  django/conf/locale/es_PR/formats.py
@@ -10,7 +10,7 @@
MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd/m/Y'
SHORT_DATETIME_FORMAT = 'd/m/Y H:i'
-FIRST_DAY_OF_WEEK = 0 # Sunday
+FIRST_DAY_OF_WEEK = 0 # Sunday
DATE_INPUT_FORMATS = (
# '31/12/2009', '31/12/09'
View
2  django/conf/locale/et/formats.py
@@ -20,5 +20,5 @@
# TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING =
View
2  django/conf/locale/fi/formats.py
@@ -20,5 +20,5 @@
# TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING =
View
24 django/conf/locale/fr/formats.py
@@ -12,25 +12,25 @@
MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'j N Y'
SHORT_DATETIME_FORMAT = 'j N Y H:i:s'
-FIRST_DAY_OF_WEEK = 1 # Monday
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = (
- '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
- '%d.%m.%Y', '%d.%m.%y', # Swiss (fr_CH), '25.10.2006', '25.10.06'
+ '%d/%m/%Y', '%d/%m/%y', # '25/10/2006', '25/10/06'
+ '%d.%m.%Y', '%d.%m.%y', # Swiss (fr_CH), '25.10.2006', '25.10.06'
# '%d %B %Y', '%d %b %Y', # '25 octobre 2006', '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'
- '%d/%m/%Y', # '25/10/2006'
- '%d.%m.%Y %H:%M:%S', # Swiss (fr_CH), '25.10.2006 14:30:59'
- '%d.%m.%Y %H:%M:%S.%f', # Swiss (fr_CH), '25.10.2006 14:30:59.000200'
- '%d.%m.%Y %H:%M', # Swiss (fr_CH), '25.10.2006 14:30'
- '%d.%m.%Y', # Swiss (fr_CH), '25.10.2006'
+ '%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', # '25/10/2006'
+ '%d.%m.%Y %H:%M:%S', # Swiss (fr_CH), '25.10.2006 14:30:59'
+ '%d.%m.%Y %H:%M:%S.%f', # Swiss (fr_CH), '25.10.2006 14:30:59.000200'
+ '%d.%m.%Y %H:%M', # Swiss (fr_CH), '25.10.2006 14:30'
+ '%d.%m.%Y', # Swiss (fr_CH), '25.10.2006'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
2  django/conf/locale/gl/formats.py
@@ -12,7 +12,7 @@
MONTH_DAY_FORMAT = r'j \d\e F'
SHORT_DATE_FORMAT = 'd-m-Y'
SHORT_DATETIME_FORMAT = 'd-m-Y, H:i'
-FIRST_DAY_OF_WEEK = 1 # Monday
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
View
40 django/conf/locale/hr/formats.py
@@ -23,26 +23,26 @@
'%d. %m. %Y.', '%d. %m. %y.', # '25. 10. 2006.', '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'
- '%Y-%m-%d', # '2006-10-25'
- '%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.', # '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', # '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:%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', # '25. 10. 06. 14:30'
- '%d. %m. %y.', # '25. 10. 06.'
+ '%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'
+ '%Y-%m-%d', # '2006-10-25'
+ '%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.', # '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', # '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:%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', # '25. 10. 06. 14:30'
+ '%d. %m. %y.', # '25. 10. 06.'
)
DECIMAL_SEPARATOR = ','
View
10 django/conf/locale/hu/formats.py
@@ -12,23 +12,23 @@
MONTH_DAY_FORMAT = 'F j.'
SHORT_DATE_FORMAT = 'Y.m.d.'
SHORT_DATETIME_FORMAT = 'Y.m.d. G.i.s'
-FIRST_DAY_OF_WEEK = 1 # Monday
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = (
- '%Y.%m.%d.', # '2006.10.25.'
+ '%Y.%m.%d.', # '2006.10.25.'
)
TIME_INPUT_FORMATS = (
- '%H.%M.%S', # '14.30.59'
+ '%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.%S.%f', # '2006.10.25. 14.30.59.000200'
+ '%Y.%m.%d. %H.%M.%S.%f', # '2006.10.25. 14.30.59.000200'
'%Y.%m.%d. %H.%M', # '2006.10.25. 14.30'
'%Y.%m.%d.', # '2006.10.25.'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
NUMBER_GROUPING = 3
View
16 django/conf/locale/it/formats.py
@@ -5,14 +5,14 @@
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
-DATE_FORMAT = 'd F Y' # 25 Ottobre 2006
-TIME_FORMAT = 'H:i:s' # 14:30:59
-DATETIME_FORMAT = 'l d F Y H:i:s' # Mercoledì 25 Ottobre 2006 14:30:59
-YEAR_MONTH_FORMAT = 'F Y' # Ottobre 2006
-MONTH_DAY_FORMAT = 'j/F' # 10/2006
-SHORT_DATE_FORMAT = 'd/m/Y' # 25/12/2009
-SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s' # 25/10/2009 14:30:59
-FIRST_DAY_OF_WEEK = 1 # Lunedì
+DATE_FORMAT = 'd F Y' # 25 Ottobre 2006
+TIME_FORMAT = 'H:i:s' # 14:30:59
+DATETIME_FORMAT = 'l d F Y H:i:s' # Mercoledì 25 Ottobre 2006 14:30:59
+YEAR_MONTH_FORMAT = 'F Y' # Ottobre 2006
+MONTH_DAY_FORMAT = 'j/F' # 10/2006
+SHORT_DATE_FORMAT = 'd/m/Y' # 25/12/2009
+SHORT_DATETIME_FORMAT = 'd/m/Y H:i:s' # 25/10/2009 14:30:59
+FIRST_DAY_OF_WEEK = 1 # Lunedì
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
View
2  django/conf/locale/ka/formats.py
@@ -12,7 +12,7 @@
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)
+FIRST_DAY_OF_WEEK = 1 # (Monday)
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
View
2  django/conf/locale/ko/formats.py
@@ -18,7 +18,7 @@
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
+ '%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'
View
2  django/conf/locale/lt/formats.py
@@ -17,7 +17,7 @@
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
+ '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
)
TIME_INPUT_FORMATS = (
'%H:%M:%S', # '14:30:59'
View
4 django/conf/locale/lv/formats.py
@@ -18,7 +18,7 @@
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
+ '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
)
TIME_INPUT_FORMATS = (
'%H:%M:%S', # '14:30:59'
@@ -45,5 +45,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = ' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
NUMBER_GROUPING = 3
View
32 django/conf/locale/mk/formats.py
@@ -22,22 +22,22 @@
)
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'
- '%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', # '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:%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', # '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:%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', # '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:%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', # '25. 10. 06. 14:30'
+ '%d. %m. %y.', # '25. 10. 06.'
)
DECIMAL_SEPARATOR = ','
View
4 django/conf/locale/ml/formats.py
@@ -12,13 +12,13 @@
MONTH_DAY_FORMAT = 'F j'
SHORT_DATE_FORMAT = 'm/d/Y'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
-FIRST_DAY_OF_WEEK = 0 # Sunday
+FIRST_DAY_OF_WEEK = 0 # Sunday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06'
+ '%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'
View
6 django/conf/locale/nb/formats.py
@@ -12,13 +12,13 @@
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
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
+ '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
# '%d. %b %Y', '%d %b %Y', # '25. okt 2006', '25 okt 2006'
# '%d. %b. %Y', '%d %b. %Y', # '25. okt. 2006', '25 okt. 2006'
# '%d. %B %Y', '%d %B %Y', # '25. oktober 2006', '25 oktober 2006'
@@ -38,5 +38,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
6 django/conf/locale/nn/formats.py
@@ -12,13 +12,13 @@
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
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
+ '%Y-%m-%d', '%d.%m.%Y', '%d.%m.%y', # '2006-10-25', '25.10.2006', '25.10.06'
# '%d. %b %Y', '%d %b %Y', # '25. okt 2006', '25 okt 2006'
# '%d. %b. %Y', '%d %b. %Y', # '25. okt. 2006', '25 okt. 2006'
# '%d. %B %Y', '%d %B %Y', # '25. oktober 2006', '25 oktober 2006'
@@ -39,5 +39,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
10 django/conf/locale/pl/formats.py
@@ -12,7 +12,7 @@
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
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
@@ -22,10 +22,10 @@
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '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'
- '%d.%m.%Y', # '25.10.2006'
+ '%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', # '25.10.2006'
)
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = ' '
View
2  django/conf/locale/pt/formats.py
@@ -18,7 +18,7 @@
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Kept ISO formats as they are in first position
DATE_INPUT_FORMATS = (
- '%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06'
+ '%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'
)
View
2  django/conf/locale/pt_BR/formats.py
@@ -17,7 +17,7 @@
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
DATE_INPUT_FORMATS = (
- '%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 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'
)
View
18 django/conf/locale/ru/formats.py
@@ -21,15 +21,15 @@
'%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', # '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', # '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:%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', # '25.10.06 14:30'
+ '%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
12 django/conf/locale/sk/formats.py
@@ -12,7 +12,7 @@
MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'd.m.Y'
SHORT_DATETIME_FORMAT = 'd.m.Y G:i:s'
-FIRST_DAY_OF_WEEK = 1 # Monday
+FIRST_DAY_OF_WEEK = 1 # Monday
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
@@ -22,11 +22,11 @@
# '%d. %B %Y', '%d. %b. %Y', # '25. October 2006', '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'
- '%d.%m.%Y', # '25.10.2006'
+ '%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', # '25.10.2006'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
32 django/conf/locale/sr/formats.py
@@ -24,22 +24,22 @@
# '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 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'
- '%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', # '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:%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', # '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:%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', # '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:%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', # '25. 10. 06. 14:30'
+ '%d. %m. %y.', # '25. 10. 06.'
)
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
View
32 django/conf/locale/sr_Latn/formats.py
@@ -24,22 +24,22 @@
# '%d. %b %Y.', '%d. %B %Y.', # '25. Oct 2006.', '25. October 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'
- '%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', # '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:%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', # '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:%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', # '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:%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', # '25. 10. 06. 14:30'
+ '%d. %m. %y.', # '25. 10. 06.'
)
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
View
2  django/conf/locale/sv/formats.py
@@ -37,5 +37,5 @@
'%m/%d/%y', # '10/25/06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = '\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
10 django/conf/locale/tr/formats.py
@@ -12,7 +12,7 @@
MONTH_DAY_FORMAT = 'd F'
SHORT_DATE_FORMAT = 'd M Y'
SHORT_DATETIME_FORMAT = 'd M Y H:i:s'
-FIRST_DAY_OF_WEEK = 1 # Pazartesi
+FIRST_DAY_OF_WEEK = 1 # Pazartesi
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
@@ -22,10 +22,10 @@
# '%d %B %Y', '%d %b. %Y', # '25 Ekim 2006', '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'
- '%d/%m/%Y', # '25/10/2006'
+ '%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', # '25/10/2006'
)
DECIMAL_SEPARATOR = ','
THOUSAND_SEPARATOR = '.'
View
6 django/contrib/admin/helpers.py
@@ -83,7 +83,7 @@ def __iter__(self):
class Fieldline(object):
def __init__(self, form, field, readonly_fields=None, model_admin=None):
- self.form = form # A django.forms.Form instance
+ self.form = form # A django.forms.Form instance
if not hasattr(field, "__iter__") or isinstance(field, six.text_type):
self.fields = [field]
else:
@@ -110,8 +110,8 @@ def errors(self):
class AdminField(object):
def __init__(self, form, field, is_first):
- self.field = form[field] # A django.forms.BoundField instance
- self.is_first = is_first # Whether this field is first on the line
+ self.field = form[field] # A django.forms.BoundField instance
+ self.is_first = is_first # Whether this field is first on the line
self.is_checkbox = isinstance(self.field.field.widget, forms.CheckboxInput)
def label_tag(self):
View
2  django/contrib/admin/options.py
@@ -1033,7 +1033,7 @@ def response_add(self, request, obj, post_url_continue=None):
attr = obj._meta.pk.attname
value = obj.serializable_value(attr)
return SimpleTemplateResponse('admin/popup_response.html', {
- 'pk_value': escape(pk_value), # for possible backwards-compatibility
+ 'pk_value': escape(pk_value), # for possible backwards-compatibility
'value': escape(value),
'obj': escapejs(obj)
})
View
8 django/contrib/admin/templatetags/admin_list.py
@@ -136,13 +136,13 @@ def result_headers(cl):
new_order_type = {'asc': 'desc', 'desc': 'asc'}[order_type]
# build new ordering param
- o_list_primary = [] # URL for making this field the primary sort
- o_list_remove = [] # URL for removing this field from sort
- o_list_toggle = [] # URL for toggling order type for this field
+ o_list_primary = [] # URL for making this field the primary sort
+ o_list_remove = [] # URL for removing this field from sort
+ o_list_toggle = [] # URL for toggling order type for this field
make_qs_param = lambda t, n: ('-' if t == 'desc' else '') + str(n)
for j, ot in ordering_field_columns.items():
- if j == i: # Same column
+ if j == i: # Same column
param = make_qs_param(new_order_type, j)
# We want clicking on this header to bring the ordering to the
# front
View
2  django/contrib/admin/templatetags/admin_modify.py
@@ -49,7 +49,7 @@ def submit_row(context):
@register.filter
def cell_count(inline_admin_form):
"""Returns the number of cells used in a tabular inline"""
- count = 1 # Hidden cell with hidden 'id' field
+ count = 1 # Hidden cell with hidden 'id' field
for fieldset in inline_admin_form:
# Loop through all the fields (one per cell)
for line in fieldset:
View
12 django/contrib/admin/utils.py
@@ -154,7 +154,7 @@ def format_callback(obj):
class NestedObjects(Collector):
def __init__(self, *args, **kwargs):
super(NestedObjects, self).__init__(*args, **kwargs)
- self.edges = {} # {from_instance: [to_instances]}
+ self.edges = {} # {from_instance: [to_instances]}
self.protected = set()
def add_edge(self, source, target):
@@ -391,7 +391,7 @@ class NotRelationField(Exception):
def get_model_from_relation(field):
if isinstance(field, models.related.RelatedObject):
return field.model
- elif getattr(field, 'rel'): # or isinstance?
+ elif getattr(field, 'rel'): # or isinstance?
return field.rel.to
else:
raise NotRelationField
@@ -412,7 +412,7 @@ def reverse_field_path(model, path):
for piece in pieces:
field, model, direct, m2m = parent._meta.get_field_by_name(piece)
# skip trailing data field if extant:
- if len(reversed_path) == len(pieces)-1: # final iteration
+ if len(reversed_path) == len(pieces)-1: # final iteration
try:
get_model_from_relation(field)
except NotRelationField:
@@ -469,8 +469,8 @@ def get_limit_choices_to_from_path(model, path):
fields and hasattr(fields[-1], 'rel') and
getattr(fields[-1].rel, 'limit_choices_to', None))
if not limit_choices_to:
- return models.Q() # empty Q
+ return models.Q() # empty Q
elif isinstance(limit_choices_to, models.Q):
- return limit_choices_to # already a Q
+ return limit_choices_to # already a Q
else:
- return models.Q(**limit_choices_to) # convert dict to Q
+ return models.Q(**limit_choices_to) # convert dict to Q
View
8 django/contrib/admin/validation.py
@@ -70,7 +70,7 @@ def validate_raw_id_fields(self, cls, model):
def validate_fields(self, cls, model):
" Validate that fields only refer to existing fields, doesn't contain duplicates. "
# fields
- if cls.fields: # default value is None
+ if cls.fields: # default value is None
check_isseq(cls, 'fields', cls.fields)
self.check_field_spec(cls, model, cls.fields, 'fields')
if cls.fieldsets:
@@ -81,7 +81,7 @@ def validate_fields(self, cls, model):
def validate_fieldsets(self, cls, model):
" Validate that fieldsets is properly formatted and doesn't contain duplicates. "
from django.contrib.admin.options import flatten_fieldsets
- if cls.fieldsets: # default value is None
+ if cls.fieldsets: # default value is None
check_isseq(cls, 'fieldsets', cls.fieldsets)
for idx, fieldset in enumerate(cls.fieldsets):
check_isseq(cls, 'fieldsets[%d]' % idx, fieldset)
@@ -100,7 +100,7 @@ def validate_fieldsets(self, cls, model):
def validate_exclude(self, cls, model):
" Validate that exclude is a sequence without duplicates. "
- if cls.exclude: # default value is None
+ if cls.exclude: # default value is None
check_isseq(cls, 'exclude', cls.exclude)
if len(cls.exclude) > len(set(cls.exclude)):
raise ImproperlyConfigured('There are duplicate field(s) in %s.exclude' % cls.__name__)
@@ -384,7 +384,7 @@ def validate_date_hierarchy(self, cls, model):
class InlineValidator(BaseValidator):
def validate_fk_name(self, cls, model):
" Validate that fk_name refers to a ForeignKey. "
- if cls.fk_name: # default value is None
+ if cls.fk_name: # default value is None
f = get_field(cls, model, 'fk_name', cls.fk_name)
if not isinstance(f, models.ForeignKey):
raise ImproperlyConfigured("'%s.fk_name is not an instance of "
View
8 django/contrib/admin/views/main.py
@@ -130,7 +130,7 @@ def get_filters_params(self, params=None):
"""
if not params:
params = self.params
- lookup_params = params.copy() # a dictionary of the query string
+ lookup_params = params.copy() # a dictionary of the query string
# Remove all the parameters that are globally and systematically
# ignored.
for ignored in IGNORED_PARAMS:
@@ -299,10 +299,10 @@ def get_ordering(self, request, queryset):
field_name = self.list_display[int(idx)]
order_field = self.get_ordering_field(field_name)
if not order_field:
- continue # No 'admin_order_field', skip it
+ continue # No 'admin_order_field', skip it
ordering.append(pfx + order_field)
except (IndexError, ValueError):
- continue # Invalid ordering specified, skip it.
+ continue # Invalid ordering specified, skip it.
# Add the given query's ordering fields, if any.
ordering.extend(queryset.query.order_by)
@@ -347,7 +347,7 @@ def get_ordering_field_columns(self):
try:
idx = int(idx)
except ValueError:
- continue # skip it
+ continue # skip it
ordering_fields[idx] = 'desc' if pfx == '-' else 'asc'
return ordering_fields
View
2  django/contrib/admin/widgets.py
@@ -164,7 +164,7 @@ def render(self, name, value, attrs=None):
else:
url = ''
if "class" not in attrs:
- attrs['class'] = 'vForeignKeyRawIdAdminField' # The JavaScript code looks for this hook.
+ attrs['class'] = 'vForeignKeyRawIdAdminField' # The JavaScript code looks for this hook.
# TODO: "lookup_id_" is hard-coded here. This should instead use
# the correct API to determine the ID dynamically.
extra.append('<a href="%s%s" class="related-lookup" id="lookup_id_%s" onclick="return showRelatedObjectLookupPopup(this);"> '
View
2  django/contrib/contenttypes/generic.py
@@ -461,7 +461,7 @@ def generic_inlineformset_factory(model, form=ModelForm,
ct_field = opts.get_field(ct_field)
if not isinstance(ct_field, models.ForeignKey) or ct_field.rel.to != ContentType:
raise Exception("fk_name '%s' is not a ForeignKey to ContentType" % ct_field)
- fk_field = opts.get_field(fk_field) # let the exception propagate
+ fk_field = opts.get_field(fk_field) # let the exception propagate
if exclude is not None:
exclude = list(exclude)
exclude.extend([ct_field.name, fk_field.name])
View
2  django/contrib/flatpages/middleware.py
@@ -6,7 +6,7 @@
class FlatpageFallbackMiddleware(object):
def process_response(self, request, response):
if response.status_code != 404:
- return response # No need to check for a flatpage for non-404 responses.
+ return response # No need to check for a flatpage for non-404 responses.
try:
return flatpage(request, request.path_info)
# Return the original response if any errors happened. Because this
View
6 django/contrib/formtools/preview.py
@@ -8,7 +8,7 @@
from django.utils.crypto import constant_time_compare
from django.contrib.formtools.utils import form_hmac
-AUTO_ID = 'formtools_%s' # Each form here uses this as its auto_id parameter.
+AUTO_ID = 'formtools_%s' # Each form here uses this as its auto_id parameter.
class FormPreview(object):
@@ -42,7 +42,7 @@ def unused_name(self, name):
try:
self.form.base_fields[name]
except KeyError:
- break # This field name isn't being used by the form.
+ break # This field name isn't being used by the form.
name += '_'
return name
@@ -75,7 +75,7 @@ def post_post(self, request):
if f.is_valid():
if not self._check_security_hash(request.POST.get(self.unused_name('hash'), ''),
request, f):
- return self.failed_hash(request) # Security hash failed.
+ return self.failed_hash(request) # Security hash failed.
return self.done(request, f.cleaned_data)
else:
return render_to_response(self.form_template,
View
6 django/contrib/gis/db/backends/mysql/operations.py
@@ -14,11 +14,11 @@ class MySQLOperations(DatabaseOperations, BaseSpatialOperations):
from_text = 'GeomFromText'
Adapter = WKTAdapter
- Adaptor = Adapter # Backwards-compatibility alias.
+ Adaptor = Adapter # Backwards-compatibility alias.
geometry_functions = {
- 'bbcontains': 'MBRContains', # For consistency w/PostGIS API
- 'bboverlaps': 'MBROverlaps', # .. ..
+ 'bbcontains': 'MBRContains', # For consistency w/PostGIS API
+ 'bboverlaps': 'MBROverlaps', # .. ..
'contained': 'MBRWithin', # .. ..
'contains': 'MBRContains',
'disjoint': 'MBRDisjoint',
View
6 django/contrib/gis/db/backends/oracle/operations.py
@@ -86,7 +86,7 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations):
valid_aggregates = {'Union', 'Extent'}
Adapter = OracleSpatialAdapter
- Adaptor = Adapter # Backwards-compatibility alias.
+ Adaptor = Adapter # Backwards-compatibility alias.
area = 'SDO_GEOM.SDO_AREA'
gml = 'SDO_UTIL.TO_GMLGEOMETRY'
@@ -126,12 +126,12 @@ class OracleOperations(DatabaseOperations, BaseSpatialOperations):
'coveredby': SDOOperation('SDO_COVEREDBY'),
'covers': SDOOperation('SDO_COVERS'),
'disjoint': SDOGeomRelate('DISJOINT'),
- 'intersects': SDOOperation('SDO_OVERLAPBDYINTERSECT'), # TODO: Is this really the same as ST_Intersects()?
+ 'intersects': SDOOperation('SDO_OVERLAPBDYINTERSECT'), # TODO: Is this really the same as ST_Intersects()?
'equals': SDOOperation('SDO_EQUAL'),
'exact': SDOOperation('SDO_EQUAL'),
'overlaps': SDOOperation('SDO_OVERLAPS'),
'same_as': SDOOperation('SDO_EQUAL'),
- 'relate': (SDORelate, six.string_types), # Oracle uses a different syntax, e.g., 'mask=inside+touch'
+ 'relate': (SDORelate, six.string_types), # Oracle uses a different syntax, e.g., 'mask=inside+touch'
'touches': SDOOperation('SDO_TOUCH'),
'within': SDOOperation('SDO_INSIDE'),
}
View
2  django/contrib/gis/db/backends/postgis/operations.py
@@ -79,7 +79,7 @@ class PostGISOperations(DatabaseOperations, BaseSpatialOperations):
valid_aggregates = {'Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union'}
Adapter = PostGISAdapter
- Adaptor = Adapter # Backwards-compatibility alias.
+ Adaptor = Adapter # Backwards-compatibility alias.
def __init__(self, connection):
super(PostGISOperations, self).__init__(connection)
View
6 django/contrib/gis/db/backends/spatialite/operations.py
@@ -68,7 +68,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
valid_aggregates = {'Extent', 'Union'}
Adapter = SpatiaLiteAdapter
- Adaptor = Adapter # Backwards-compatibility alias.
+ Adaptor = Adapter # Backwards-compatibility alias.
area = 'Area'
centroid = 'Centroid'
@@ -77,7 +77,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
distance = 'Distance'
envelope = 'Envelope'
intersection = 'Intersection'
- length = 'GLength' # OpenGis defines Length, but this conflicts with an SQLite reserved keyword
+ length = 'GLength' # OpenGis defines Length, but this conflicts with an SQLite reserved keyword
num_geom = 'NumGeometries'
num_points = 'NumPoints'
point_on_surface = 'PointOnSurface'
@@ -86,7 +86,7 @@ class SpatiaLiteOperations(DatabaseOperations, BaseSpatialOperations):
sym_difference = 'SymDifference'
transform = 'Transform'
translate = 'ShiftCoords'
- union = 'GUnion' # OpenGis defines Union, but this conflicts with an SQLite reserved keyword
+ union = 'GUnion' # OpenGis defines Union, but this conflicts with an SQLite reserved keyword
unionagg = 'GUnion'
from_text = 'GeomFromText'
View
2  django/contrib/gis/db/models/fields.py
@@ -188,7 +188,7 @@ def get_srid(self, geom):
the SRID set for the field. For example, if the input geometry
has no SRID, then that of the field will be returned.
"""
- gsrid = geom.srid # SRID of given geometry.
+ gsrid = geom.srid # SRID of given geometry.
if gsrid is None or self.srid == -1 or (gsrid == -1 and self.srid != -1):
return self.srid
else:
View
4 django/contrib/gis/db/models/query.py
@@ -50,7 +50,7 @@ def area(self, tolerance=0.05, **kwargs):
if backend.oracle:
s['procedure_fmt'] = '%(geo_col)s,%(tolerance)s'
s['procedure_args']['tolerance'] = tolerance
- s['select_field'] = AreaField('sq_m') # Oracle returns area in units of meters.
+ s['select_field'] = AreaField('sq_m') # Oracle returns area in units of meters.
elif backend.postgis or backend.spatialite:
if backend.geography:
# Geography fields support area calculation, returns square meters.
@@ -420,7 +420,7 @@ def transform(self, srid=4326, **kwargs):
custom_sel = '%s(%s, %s)' % (connections[self.db].ops.transform, geo_col, srid)
# TODO: Should we have this as an alias?
# custom_sel = '(%s(%s, %s)) AS %s' % (SpatialBackend.transform, geo_col, srid, qn(geo_field.name))
- self.query.transformed_srid = srid # So other GeoQuerySet methods
+ self.query.transformed_srid = srid # So other GeoQuerySet methods
self.query.custom_select[geo_field] = custom_sel
return self._clone()
View
6 django/contrib/gis/gdal/geometries.py
@@ -339,9 +339,9 @@ def wkb_size(self):
def wkb(self):
"Returns the WKB representation of the Geometry."
if sys.byteorder == 'little':
- byteorder = 1 # wkbNDR (from ogr_core.h)
+ byteorder = 1 # wkbNDR (from ogr_core.h)
else:
- byteorder = 0 # wkbXDR
+ byteorder = 0 # wkbXDR
sz = self.wkb_size
# Creating the unsigned character buffer, and passing it in by reference.
buf = (c_ubyte * sz)()
@@ -635,7 +635,7 @@ def __getitem__(self, index):
@property
def shell(self):
"Returns the shell of this Polygon."
- return self[0] # First ring is the shell
+ return self[0] # First ring is the shell
exterior_ring = shell
@property
View
2  django/contrib/gis/gdal/prototypes/ds.py
@@ -9,7 +9,7 @@
from django.contrib.gis.gdal.prototypes.generation import (const_string_output,
double_output, geom_output, int_output, srs_output, void_output, voidptr_output)
-c_int_p = POINTER(c_int) # shortcut type
+c_int_p = POINTER(c_int) # shortcut type
### Driver Routines ###
register_all = void_output(lgdal.OGRRegisterAll, [], errcheck=False)
View
2  django/contrib/gis/gdal/prototypes/geom.py
@@ -59,7 +59,7 @@ def topology_func(f):
destroy_geom = void_output(lgdal.OGR_G_DestroyGeometry, [c_void_p], errcheck=False)
# Geometry export routines.
-to_wkb = void_output(lgdal.OGR_G_ExportToWkb, None, errcheck=True) # special handling for WKB.
+to_wkb = void_output(lgdal.OGR_G_ExportToWkb, None, errcheck=True) # special handling for WKB.
to_wkt = string_output(lgdal.OGR_G_ExportToWkt, [c_void_p, POINTER(c_char_p)], decoding='ascii')
to_gml = string_output(lgdal.OGR_G_ExportToGML, [c_void_p], str_result=True, decoding='ascii')
get_wkbsize = int_output(lgdal.OGR_G_WkbSize, [c_void_p])
View
8 django/contrib/gis/gdal/tests/test_ds.py
@@ -13,19 +13,19 @@
ds_list = (
TestDS('test_point', nfeat=5, nfld=3, geom='POINT', gtype=1, driver='ESRI Shapefile',
fields={'dbl': OFTReal, 'int': OFTInteger, 'str': OFTString},
- extent=(-1.35011, 0.166623, -0.524093, 0.824508), # Got extent from QGIS
+ extent=(-1.35011, 0.166623, -0.524093, 0.824508), # Got extent from QGIS
srs_wkt='GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]',
field_values={'dbl': [float(i) for i in range(1, 6)], 'int': list(range(1, 6)), 'str': [str(i) for i in range(1, 6)]},
fids=range(5)),
TestDS('test_vrt', ext='vrt', nfeat=3, nfld=3, geom='POINT', gtype='Point25D', driver='VRT',
- fields={'POINT_X': OFTString, 'POINT_Y': OFTString, 'NUM': OFTString}, # VRT uses CSV, which all types are OFTString.
- extent=(1.0, 2.0, 100.0, 523.5), # Min/Max from CSV
+ fields={'POINT_X': OFTString, 'POINT_Y': OFTString, 'NUM': OFTString}, # VRT uses CSV, which all types are OFTString.
+ extent=(1.0, 2.0, 100.0, 523.5), # Min/Max from CSV
field_values={'POINT_X': ['1.0', '5.0', '100.0'], 'POINT_Y': ['2.0', '23.0', '523.5'], 'NUM': ['5', '17', '23']},
fids=range(1, 4)),
TestDS('test_poly', nfeat=3, nfld=3, geom='POLYGON', gtype=3,
driver='ESRI Shapefile',
fields={'float': OFTReal, 'int': OFTInteger, 'str': OFTString},
- extent=(-1.01513, -0.558245, 0.161876, 0.839637), # Got extent from QGIS
+ extent=(-1.01513, -0.558245, 0.161876, 0.839637), # Got extent from QGIS
srs_wkt='GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]'),
)
View
2  django/contrib/gis/gdal/tests/test_envelope.py
@@ -23,7 +23,7 @@ def test01_init(self):
"Testing Envelope initilization."
e1 = Envelope((0, 0, 5, 5))
Envelope(0, 0, 5, 5)
- Envelope(0, '0', '5', 5) # Thanks to ww for this
+ Envelope(0, '0', '5', 5) # Thanks to ww for this
Envelope(e1._envelope)
self.assertRaises(OGRException, Envelope, (5, 5, 0, 0))
self.assertRaises(OGRException, Envelope, 5, 5, 0, 0)
View
38 django/contrib/gis/gdal/tests/test_geom.py
@@ -130,7 +130,7 @@ def test02_points(self):
OGRGeometry('POINT(0 0)')
for p in self.geometries.points:
- if not hasattr(p, 'z'): # No 3D
+ if not hasattr(p, 'z'): # No 3D
pnt = OGRGeometry(p.wkt)
self.assertEqual(1, pnt.geom_type)
self.assertEqual('POINT', pnt.geom_name)
@@ -141,15 +141,15 @@ def test02_points(self):
def test03_multipoints(self):
"Testing MultiPoint objects."
for mp in self.geometries.multipoints:
- mgeom1 = OGRGeometry(mp.wkt) # First one from WKT
+ mgeom1 = OGRGeometry(mp.wkt) # First one from WKT
self.assertEqual(4, mgeom1.geom_type)
self.assertEqual('MULTIPOINT', mgeom1.geom_name)
- mgeom2 = OGRGeometry('MULTIPOINT') # Creating empty multipoint
+ mgeom2 = OGRGeometry('MULTIPOINT') # Creating empty multipoint
mgeom3 = OGRGeometry('MULTIPOINT')
for g in mgeom1:
- mgeom2.add(g) # adding each point from the multipoints
- mgeom3.add(g.wkt) # should take WKT as well
- self.assertEqual(mgeom1, mgeom2) # they should equal
+ mgeom2.add(g) # adding each point from the multipoints
+ mgeom3.add(g.wkt) # should take WKT as well
+ self.assertEqual(mgeom1, mgeom2) # they should equal
self.assertEqual(mgeom1, mgeom3)
self.assertEqual(mp.coords, mgeom2.coords)
self.assertEqual(mp.n_p, mgeom2.point_count)
@@ -247,7 +247,7 @@ def test07b_closepolygons(self):
poly.centroid
poly.close_rings()
- self.assertEqual(10, poly.point_count) # Two closing points should've been added
+ self.assertEqual(10, poly.point_count) # Two closing points should've been added
self.assertEqual(OGRGeometry('POINT(2.5 2.5)'), poly.centroid)
def test08_multipolygons(self):
@@ -309,7 +309,7 @@ def test09a_srs(self):
# Changing each ring in the polygon
self.assertEqual(32140, ring.srs.srid)
self.assertEqual('NAD83 / Texas South Central', ring.srs.name)
- ring.srs = str(SpatialReference(4326)) # back to WGS84
+ ring.srs = str(SpatialReference(4326)) # back to WGS84
self.assertEqual(4326, ring.srs.srid)
# Using the `srid` property.
@@ -361,8 +361,8 @@ def test10_difference(self):
d1 = OGRGeometry(self.geometries.diff_geoms[i].wkt)
d2 = a.difference(b)
self.assertEqual(d1, d2)
- self.assertEqual(d1, a - b) # __sub__ is difference operator
- a -= b # testing __isub__
+ self.assertEqual(d1, a - b) # __sub__ is difference operator
+ a -= b # testing __isub__
self.assertEqual(d1, a)
def test11_intersection(self):
@@ -374,8 +374,8 @@ def test11_intersection(self):
self.assertTrue(a.intersects(b))
i2 = a.intersection(b)
self.assertEqual(i1, i2)
- self.assertEqual(i1, a & b) # __and__ is intersection operator
- a &= b # testing __iand__
+ self.assertEqual(i1, a & b) # __and__ is intersection operator
+ a &= b # testing __iand__
self.assertEqual(i1, a)
def test12_symdifference(self):
@@ -386,8 +386,8 @@ def test12_symdifference(self):
d1 = OGRGeometry(self.geometries.sdiff_geoms[i].wkt)
d2 = a.sym_difference(b)
self.assertEqual(d1, d2)
- self.assertEqual(d1, a ^ b) # __xor__ is symmetric difference operator
- a ^= b # testing __ixor__
+ self.assertEqual(d1, a ^ b) # __xor__ is symmetric difference operator
+ a ^= b # testing __ixor__
self.assertEqual(d1, a)
def test13_union(self):
@@ -398,8 +398,8 @@ def test13_union(self):
u1 = OGRGeometry(self.geometries.union_geoms[i].wkt)
u2 = a.union(b)
self.assertEqual(u1, u2)
- self.assertEqual(u1, a | b) # __or__ is union operator
- a |= b # testing __ior__
+ self.assertEqual(u1, a | b) # __or__ is union operator
+ a |= b # testing __ior__
self.assertEqual(u1, a)
def test14_add(self):
@@ -418,9 +418,9 @@ def test14_add(self):
mp3 = OGRGeometry('MultiPolygon')
for poly in mpoly:
- mp1.add(poly) # Adding a geometry at a time
- mp2.add(poly.wkt) # Adding WKT
- mp3.add(mpoly) # Adding a MultiPolygon's entire contents at once.
+ mp1.add(poly) # Adding a geometry at a time
+ mp2.add(poly.wkt) # Adding WKT
+ mp3.add(mpoly) # Adding a MultiPolygon's entire contents at once.
for tmp in (mp1, mp2, mp3):
self.assertEqual(mpoly, tmp)
View
4 django/contrib/gis/gdal/tests/test_srs.py
@@ -127,8 +127,8 @@ def test10_attributes(self):
for s in srlist:
srs = SpatialReference(s.wkt)
for tup in s.attr:
- att = tup[0] # Attribute to test
- exp = tup[1] # Expected result
+ att = tup[0] # Attribute to test
+ exp = tup[1] # Expected result
self.assertEqual(exp, srs[att])
def test11_wellknown(self):
View
6 django/contrib/gis/geoip/tests.py
@@ -30,10 +30,10 @@ class GeoIPTest(unittest.TestCase):
def test01_init(self):
"Testing GeoIP initialization."
- g1 = GeoIP() # Everything inferred from GeoIP path
+ g1 = GeoIP() # Everything inferred from GeoIP path
path = settings.GEOIP_PATH
- g2 = GeoIP(path, 0) # Passing in data path explicitly.
- g3 = GeoIP.open(path, 0) # MaxMind Python API syntax.
+ g2 = GeoIP(path, 0) # Passing in data path explicitly.
+ g3 = GeoIP.open(path, 0) # MaxMind Python API syntax.
for g in (g1, g2, g3):
self.assertEqual(True, bool(g._country))
View
8 django/contrib/gis/geos/linestring.py
@@ -47,7 +47,7 @@ def __init__(self, *args, **kwargs):
raise TypeError('Dimension mismatch.')
numpy_coords = False
elif numpy and isinstance(coords, numpy.ndarray):
- shape = coords.shape # Using numpy's shape.
+ shape = coords.shape # Using numpy's shape.
if len(shape) != 2:
raise TypeError('Too many dimensions.')
self._checkdim(shape[1])
@@ -91,8 +91,8 @@ def _get_single_external(self, index):
_get_single_internal = _get_single_external
def _set_list(self, length, items):
- ndim = self._cs.dims #
- hasz = self._cs.hasz # I don't understand why these are different
+ ndim = self._cs.dims
+ hasz = self._cs.hasz # I don't understand why these are different
# create a new coordinate sequence and populate accordingly
cs = GEOSCoordSeq(capi.create_cs(length, ndim), z=hasz)
@@ -130,7 +130,7 @@ def _listarr(self, func):
"""
lst = [func(i) for i in xrange(len(self))]
if numpy:
- return numpy.array(lst) # ARRRR!
+ return numpy.array(lst) # ARRRR!
else:
return lst
View
2  django/contrib/gis/geos/prototypes/errcheck.py
@@ -58,7 +58,7 @@ def check_minus_one(result, func, cargs):
def check_predicate(result, func, cargs):
"Error checking for unary/binary predicate functions."
- val = ord(result) # getting the ordinal from the character
+ val = ord(result) # getting the ordinal from the character
if val == 1:
return True
elif val == 0:
View
2  django/contrib/gis/geos/prototypes/misc.py
@@ -21,7 +21,7 @@ def dbl_from_geom(func, num_geom=1):
argtypes = [GEOM_PTR for i in xrange(num_geom)]
argtypes += [POINTER(c_double)]
func.argtypes = argtypes
- func.restype = c_int # Status code returned
+ func.restype = c_int # Status code returned
func.errcheck = check_dbl
return func
View
56 django/contrib/gis/geos/tests/test_geos.py
@@ -198,7 +198,7 @@ def test_ewkt(self):
poly = fromstr(ewkt)
self.assertEqual(srid, poly.srid)
self.assertEqual(srid, poly.shell.srid)
- self.assertEqual(srid, fromstr(poly.ewkt).srid) # Checking export
+ self.assertEqual(srid, fromstr(poly.ewkt).srid) # Checking export
@skipUnless(HAS_GDAL, "GDAL is required.")
def test_json(self):
@@ -279,7 +279,7 @@ def test_points(self):
# Now testing the different constructors
pnt2 = Point(tup_args) # e.g., Point((1, 2))
- pnt3 = Point(*tup_args) # e.g., Point(1, 2)
+ pnt3 = Point(*tup_args) # e.g., Point(1, 2)
self.assertEqual(True, pnt == pnt2)
self.assertEqual(True, pnt == pnt3)
@@ -295,7 +295,7 @@ def test_points(self):
pnt.coords = set_tup2
self.assertEqual(set_tup2, pnt.coords)
- prev = pnt # setting the previous geometry
+ prev = pnt # setting the previous geometry
def test_multipoints(self):
"Testing MultiPoint objects."
@@ -337,11 +337,11 @@ def test_linestring(self):
# Creating a LineString from a tuple, list, and numpy array
self.assertEqual(ls, LineString(ls.tuple)) # tuple
- self.assertEqual(ls, LineString(*ls.tuple)) # as individual arguments
- self.assertEqual(ls, LineString([list(tup) for tup in ls.tuple])) # as list
- self.assertEqual(ls.wkt, LineString(*tuple(Point(tup) for tup in ls.tuple)).wkt) # Point individual arguments
+ self.assertEqual(ls, LineString(*ls.tuple)) # as individual arguments
+ self.assertEqual(ls, LineString([list(tup) for tup in ls.tuple])) # as list
+ self.assertEqual(ls.wkt, LineString(*tuple(Point(tup) for tup in ls.tuple)).wkt) # Point individual arguments
if numpy:
- self.assertEqual(ls, LineString(numpy.array(ls.tuple))) # as numpy array
+ self.assertEqual(ls, LineString(numpy.array(ls.tuple))) # as numpy array
def test_multilinestring(self):
"Testing MultiLineString objects."
@@ -409,7 +409,7 @@ def test_polygons(self):
self.assertEqual(poly.empty, False)
self.assertEqual(poly.ring, False)
self.assertEqual(p.n_i, poly.num_interior_rings)
- self.assertEqual(p.n_i + 1, len(poly)) # Testing __len__
+ self.assertEqual(p.n_i + 1, len(poly)) # Testing __len__
self.assertEqual(p.n_p, poly.num_points)
# Area & Centroid
@@ -419,7 +419,7 @@ def test_polygons(self):
# Testing the geometry equivalence
self.assertEqual(True, poly == fromstr(p.wkt))
- self.assertEqual(False, poly == prev) # Should not be equal to previous geometry
+ self.assertEqual(False, poly == prev) # Should not be equal to previous geometry
self.assertEqual(True, poly != prev)
# Testing the exterior ring
@@ -428,7 +428,7 @@ def test_polygons(self):
self.assertEqual(ring.geom_typeid, 2)
if p.ext_ring_cs:
self.assertEqual(p.ext_ring_cs, ring.tuple)
- self.assertEqual(p.ext_ring_cs, poly[0].tuple) # Testing __getitem__
+ self.assertEqual(p.ext_ring_cs, poly[0].tuple) # Testing __getitem__
# Testing __getitem__ and __setitem__ on invalid indices
self.assertRaises(GEOSIndexError, poly.__getitem__, len(poly))
@@ -522,13 +522,13 @@ def test_coord_seq(self):
poly = fromstr(p.wkt)
cs = poly.exterior_ring.coord_seq
- self.assertEqual(p.ext_ring_cs, cs.tuple) # done in the Polygon test too.
- self.assertEqual(len(p.ext_ring_cs), len(cs)) # Making sure __len__ works
+ self.assertEqual(p.ext_ring_cs, cs.tuple) # done in the Polygon test too.
+ self.assertEqual(len(p.ext_ring_cs), len(cs)) # Making sure __len__ works
# Checks __getitem__ and __setitem__
for i in xrange(len(p.ext_ring_cs)):
- c1 = p.ext_ring_cs[i] # Expected value
- c2 = cs[i] # Value from coordseq
+ c1 = p.ext_ring_cs[i] # Expected value
+ c2 = cs[i] # Value from coordseq
self.assertEqual(c1, c2)
# Constructing the test value to set the coordinate sequence with
@@ -562,8 +562,8 @@ def test_intersection(self):
self.assertEqual(True, a.intersects(b))
i2 = a.intersection(b)
self.assertEqual(i1, i2)
- self.assertEqual(i1, a & b) # __and__ is intersection operator
- a &= b # testing __iand__
+ self.assertEqual(i1, a & b) # __and__ is intersection operator
+ a &= b # testing __iand__
self.assertEqual(i1, a)
def test_union(self):
@@ -574,8 +574,8 @@ def test_union(self):
u1 = fromstr(self.geometries.union_geoms[i].wkt)
u2 = a.union(b)
self.assertEqual(u1, u2)
- self.assertEqual(u1, a | b) # __or__ is union operator
- a |= b # testing __ior__
+ self.assertEqual(u1, a | b) # __or__ is union operator
+ a |= b # testing __ior__
self.assertEqual(u1, a)
def test_difference(self):
@@ -586,8 +586,8 @@ def test_difference(self):
d1 = fromstr(self.geometries.diff_geoms[i].wkt)
d2 = a.difference(b)
self.assertEqual(d1, d2)
- self.assertEqual(d1, a - b) # __sub__ is difference operator
- a -= b # testing __isub__
+ self.assertEqual(d1, a - b) # __sub__ is difference operator
+ a -= b # testing __isub__
self.assertEqual(d1, a)
def test_symdifference(self):
@@ -598,8 +598,8 @@ def test_symdifference(self):
d1 = fromstr(self.geometries.sdiff_geoms[i].wkt)
d2 = a.sym_difference(b)
self.assertEqual(d1, d2)
- self.assertEqual(d1, a ^ b) # __xor__ is symmetric difference operator
- a ^= b # testing __ixor__
+ self.assertEqual(d1, a ^ b) # __xor__ is symmetric difference operator
+ a ^= b # testing __ixor__