Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged recent changes from trunk.

  • Loading branch information...
commit 8e3fd703d02c31a4c3ac9f51f5011d03c0bd47f6 2 parents 507bb50 + 26e0ba0
@freakboy3742 freakboy3742 authored
Showing with 4,840 additions and 4,079 deletions.
  1. +16 −3 AUTHORS
  2. +10 −0 django/bin/django-2to3.py
  3. +7 −3 django/conf/__init__.py
  4. +6 −6 django/conf/global_settings.py
  5. +74 −72 django/conf/locale/__init__.py
  6. +1 −0  django/conf/locale/ar/formats.py
  7. +2 −1  django/conf/locale/bg/formats.py
  8. +2 −1  django/conf/locale/cs/formats.py
  9. +2 −2 django/conf/locale/en/formats.py
  10. +2 −1  django/conf/locale/es_MX/formats.py
  11. +2 −1  django/conf/locale/et/formats.py
  12. +1 −0  django/conf/locale/fa/formats.py
  13. +3 −2 django/conf/locale/fi/formats.py
  14. +2 −1  django/conf/locale/fr/formats.py
  15. +8 −7 django/conf/locale/gl/formats.py
  16. +1 −0  django/conf/locale/he/formats.py
  17. +2 −1  django/conf/locale/hu/formats.py
  18. +1 −0  django/conf/locale/ja/formats.py
  19. +1 −0  django/conf/locale/km/formats.py
  20. +1 −0  django/conf/locale/ko/formats.py
  21. +2 −1  django/conf/locale/lv/formats.py
  22. +2 −1  django/conf/locale/nb/formats.py
  23. +2 −1  django/conf/locale/nn/formats.py
  24. +2 −1  django/conf/locale/pl/formats.py
  25. +1 −0  django/conf/locale/pt_BR/formats.py
  26. +2 −1  django/conf/locale/ru/formats.py
  27. +2 −1  django/conf/locale/sk/formats.py
  28. +2 −1  django/conf/locale/sv/formats.py
  29. +3 −1 django/conf/locale/uk/formats.py
  30. +1 −0  django/conf/locale/vi/formats.py
  31. +4 −4 django/conf/project_template/project_name/settings.py
  32. +3 −2 django/conf/urls/__init__.py
  33. +2 −2 django/conf/urls/i18n.py
  34. +4 −4 django/contrib/admin/actions.py
  35. +4 −4 django/contrib/admin/filters.py
  36. +3 −2 django/contrib/admin/forms.py
  37. +22 −21 django/contrib/admin/helpers.py
  38. +9 −6 django/contrib/admin/models.py
  39. +37 −38 django/contrib/admin/options.py
  40. +6 −4 django/contrib/admin/sites.py
  41. +4 −0 django/contrib/admin/static/admin/css/forms.css
  42. +2 −1  django/contrib/admin/static/admin/css/widgets.css
  43. +6 −6 django/contrib/admin/static/admin/js/actions.min.js
  44. +2 −2 django/contrib/admin/static/admin/js/collapse.min.js
  45. +1 −1  django/contrib/admin/static/admin/js/inlines.js
  46. +5 −5 django/contrib/admin/static/admin/js/inlines.min.js
  47. +1 −1  django/contrib/admin/static/admin/js/prepopulate.min.js
  48. +1 −2  django/contrib/admin/templates/admin/auth/user/change_password.html
  49. +3 −4 django/contrib/admin/templates/admin/change_form.html
  50. +1 −2  django/contrib/admin/templates/admin/change_list.html
  51. +1 −1  django/contrib/admin/templates/admin/delete_confirmation.html
  52. +1 −1  django/contrib/admin/templates/admin/edit_inline/stacked.html
  53. +1 −1  django/contrib/admin/templates/admin/edit_inline/tabular.html
  54. +1 −1  django/contrib/admin/templates/admin/object_history.html
  55. +35 −26 django/contrib/admin/templatetags/admin_list.py
  56. +1 −1  django/contrib/admin/templatetags/admin_modify.py
  57. +7 −1 django/contrib/admin/templatetags/admin_urls.py
  58. +1 −1  django/contrib/admin/templatetags/log.py
  59. +22 −20 django/contrib/admin/util.py
  60. +4 −4 django/contrib/admin/views/main.py
  61. +35 −26 django/contrib/admin/widgets.py
  62. +1 −1  django/contrib/admindocs/templates/admin_doc/bookmarklets.html
  63. +4 −4 django/contrib/admindocs/tests/__init__.py
  64. +2 −2 django/contrib/admindocs/utils.py
  65. +4 −3 django/contrib/admindocs/views.py
  66. +3 −2 django/contrib/auth/admin.py
  67. +2 −1  django/contrib/auth/backends.py
  68. +2 −1  django/contrib/auth/context_processors.py
  69. +9 −4 django/contrib/auth/decorators.py
  70. +22 −20 django/contrib/auth/forms.py
  71. +25 −17 django/contrib/auth/hashers.py
  72. +19 −13 django/contrib/auth/management/__init__.py
  73. +4 −3 django/contrib/auth/management/commands/createsuperuser.py
  74. +19 −15 django/contrib/auth/models.py
  75. +6 −4 django/contrib/auth/tests/auth_backends.py
  76. +89 −2 django/contrib/auth/tests/basic.py
  77. +21 −17 django/contrib/auth/tests/forms.py
  78. +19 −9 django/contrib/auth/tests/hashers.py
  79. +5 −4 django/contrib/auth/tests/management.py
  80. +13 −23 django/contrib/auth/tests/models.py
  81. +3 −0  django/contrib/auth/tests/tokens.py
  82. +7 −7 django/contrib/auth/tests/views.py
  83. +3 −2 django/contrib/auth/tokens.py
  84. +12 −8 django/contrib/auth/views.py
  85. +4 −2 django/contrib/comments/admin.py
  86. +2 −2 django/contrib/comments/forms.py
  87. +2 −2 django/contrib/comments/managers.py
  88. +5 −2 django/contrib/comments/models.py
  89. +2 −2 django/contrib/comments/templatetags/comments.py
  90. +3 −3 django/contrib/comments/views/moderation.py
  91. +7 −3 django/contrib/comments/views/utils.py
  92. +4 −3 django/contrib/contenttypes/generic.py
  93. +7 −5 django/contrib/contenttypes/management.py
  94. +19 −12 django/contrib/contenttypes/models.py
  95. +96 −5 django/contrib/contenttypes/tests.py
  96. +4 −2 django/contrib/contenttypes/views.py
  97. +23 −26 django/contrib/databrowse/datastructures.py
  98. +11 −8 django/contrib/databrowse/plugins/calendars.py
  99. +13 −10 django/contrib/databrowse/plugins/fieldchoices.py
  100. +6 −2 django/contrib/databrowse/plugins/objects.py
  101. +3 −1 django/contrib/databrowse/sites.py
  102. +7 −3 django/contrib/databrowse/tests.py
  103. +6 −2 django/contrib/flatpages/models.py
  104. +4 −2 django/contrib/flatpages/tests/forms.py
  105. +1 −1  django/contrib/flatpages/views.py
  106. +66 −39 django/contrib/formtools/tests/__init__.py
  107. +1 −0  django/contrib/formtools/tests/forms.py
  108. +6 −4 django/contrib/formtools/tests/wizard/forms.py
  109. +25 −16 django/contrib/formtools/tests/wizard/namedwizardtests/tests.py
  110. +25 −16 django/contrib/formtools/tests/wizard/wizardtests/tests.py
  111. +4 −1 django/contrib/formtools/utils.py
  112. +4 −5 django/contrib/formtools/wizard/storage/base.py
  113. +10 −8 django/contrib/formtools/wizard/views.py
  114. +25 −2 django/contrib/gis/admin/widgets.py
  115. +7 −4 django/contrib/gis/db/backends/base.py
  116. +3 −1 django/contrib/gis/db/backends/mysql/operations.py
  117. +3 −1 django/contrib/gis/db/backends/oracle/models.py
  118. +4 −3 django/contrib/gis/db/backends/oracle/operations.py
  119. +3 −1 django/contrib/gis/db/backends/postgis/models.py
  120. +14 −32 django/contrib/gis/db/backends/postgis/operations.py
  121. +4 −6 django/contrib/gis/db/backends/spatialite/creation.py
  122. +2 −1  django/contrib/gis/db/backends/spatialite/introspection.py
  123. +3 −1 django/contrib/gis/db/backends/spatialite/models.py
  124. +9 −7 django/contrib/gis/db/backends/spatialite/operations.py
  125. +4 −2 django/contrib/gis/db/backends/util.py
  126. +2 −1  django/contrib/gis/db/models/fields.py
  127. +2 −1  django/contrib/gis/db/models/proxy.py
  128. +12 −8 django/contrib/gis/db/models/query.py
  129. +4 −3 django/contrib/gis/db/models/sql/compiler.py
  130. +12 −10 django/contrib/gis/feeds.py
  131. +18 −10 django/contrib/gis/forms/fields.py
  132. +8 −8 django/contrib/gis/gdal/__init__.py
  133. +2 −1  django/contrib/gis/gdal/base.py
  134. +7 −4 django/contrib/gis/gdal/datasource.py
  135. +6 −4 django/contrib/gis/gdal/driver.py
  136. +10 −7 django/contrib/gis/gdal/feature.py
  137. +16 −24 django/contrib/gis/gdal/geometries.py
  138. +5 −3 django/contrib/gis/gdal/geomtype.py
  139. +11 −8 django/contrib/gis/gdal/layer.py
  140. +11 −17 django/contrib/gis/gdal/libgdal.py
  141. +10 −9 django/contrib/gis/gdal/prototypes/errcheck.py
  142. +5 −10 django/contrib/gis/gdal/prototypes/geom.py
  143. +17 −15 django/contrib/gis/gdal/srs.py
  144. +2 −1  django/contrib/gis/gdal/tests/__init__.py
  145. +1 −1  django/contrib/gis/gdal/tests/test_envelope.py
  146. +2 −6 django/contrib/gis/gdal/tests/test_geom.py
  147. +4 −2 django/contrib/gis/geoip/base.py
  148. +8 −4 django/contrib/gis/geoip/tests.py
  149. +2 −1  django/contrib/gis/geometry/test_data.py
  150. +0 −1  django/contrib/gis/geos/base.py
  151. +5 −4 django/contrib/gis/geos/collections.py
  152. +1 −0  django/contrib/gis/geos/coordseq.py
  153. +3 −1 django/contrib/gis/geos/factory.py
  154. +10 −9 django/contrib/gis/geos/geometry.py
  155. +2 −1  django/contrib/gis/geos/linestring.py
  156. +5 −3 django/contrib/gis/geos/mutable_list.py
  157. +4 −2 django/contrib/gis/geos/point.py
  158. +7 −2 django/contrib/gis/geos/polygon.py
  159. +5 −3 django/contrib/gis/geos/prototypes/io.py
  160. +1 −0  django/contrib/gis/geos/prototypes/misc.py
  161. +20 −10 django/contrib/gis/geos/tests/test_geos.py
  162. +6 −5 django/contrib/gis/geos/tests/test_io.py
  163. +2 −1  django/contrib/gis/geos/tests/test_mutable_list.py
  164. +11 −8 django/contrib/gis/maps/google/gmap.py
  165. +11 −7 django/contrib/gis/maps/google/overlays.py
  166. +11 −10 django/contrib/gis/maps/google/zoom.py
  167. +146 −176 django/contrib/gis/measure.py
  168. +9 −6 django/contrib/gis/sitemaps/views.py
  169. +4 −8 django/contrib/gis/tests/__init__.py
  170. +15 −7 django/contrib/gis/tests/distapp/models.py
  171. +17 −9 django/contrib/gis/tests/geo3d/models.py
  172. +3 −1 django/contrib/gis/tests/geoadmin/models.py
  173. +20 −2 django/contrib/gis/tests/geoadmin/tests.py
  174. +11 −5 django/contrib/gis/tests/geoapp/models.py
  175. +3 −3 django/contrib/gis/tests/geoapp/test_feeds.py
  176. +7 −7 django/contrib/gis/tests/geoapp/test_regress.py
  177. +5 −5 django/contrib/gis/tests/geoapp/test_sitemaps.py
  178. +406 −398 django/contrib/gis/tests/geoapp/tests.py
  179. +7 −3 django/contrib/gis/tests/geogapp/models.py
  180. +9 −5 django/contrib/gis/tests/relatedapp/models.py
  181. +24 −2 django/contrib/gis/tests/test_geoforms.py
  182. +2 −4 django/contrib/gis/tests/test_measure.py
  183. +6 −9 django/contrib/gis/tests/test_spatialrefsys.py
  184. +11 −0 django/contrib/gis/tests/utils.py
  185. +6 −5 django/contrib/gis/utils/layermapping.py
  186. +4 −3 django/contrib/gis/utils/ogrinspect.py
  187. +5 −3 django/contrib/gis/utils/wkt.py
  188. +4 −2 django/contrib/gis/views.py
  189. +24 −19 django/contrib/humanize/templatetags/humanize.py
  190. +53 −36 django/contrib/humanize/tests.py
  191. +25 −24 django/contrib/localflavor/ar/ar_provinces.py
  192. +17 −7 django/contrib/localflavor/ar/forms.py
  193. +4 −4 django/contrib/localflavor/at/forms.py
  194. +6 −6 django/contrib/localflavor/au/forms.py
  195. +12 −11 django/contrib/localflavor/br/br_states.py
  196. +14 −14 django/contrib/localflavor/br/forms.py
  197. +16 −16 django/contrib/localflavor/ca/forms.py
  198. +7 −7 django/contrib/localflavor/ch/forms.py
  199. +16 −15 django/contrib/localflavor/cl/cl_regions.py
  200. +7 −7 django/contrib/localflavor/cl/forms.py
  201. +35 −35 django/contrib/localflavor/cn/cn_provinces.py
  202. +10 −10 django/contrib/localflavor/cn/forms.py
  203. +34 −33 django/contrib/localflavor/co/co_departments.py
  204. +10 −10 django/contrib/localflavor/cz/forms.py
  205. +4 −4 django/contrib/localflavor/de/forms.py
  206. +3 −1 django/contrib/localflavor/de_CH/formats.py
  207. +25 −24 django/contrib/localflavor/ec/ec_provinces.py
  208. +3 −3 django/contrib/localflavor/es/forms.py
  209. +345 −343 django/contrib/localflavor/fi/fi_municipalities.py
  210. +3 −3 django/contrib/localflavor/fi/forms.py
  211. +12 −9 django/contrib/localflavor/fr/forms.py
  212. +110 −109 django/contrib/localflavor/fr/fr_department.py
  213. +3 −3 django/contrib/localflavor/gb/forms.py
  214. +5 −5 django/contrib/localflavor/hk/forms.py
  215. +14 −14 django/contrib/localflavor/hr/forms.py
  216. +28 −26 django/contrib/localflavor/hr/hr_choices.py
  217. +11 −11 django/contrib/localflavor/id/forms.py
  218. +4 −3 django/contrib/localflavor/il/forms.py
  219. +10 −10 django/contrib/localflavor/in_/forms.py
  220. +6 −6 django/contrib/localflavor/is_/forms.py
  221. +148 −147 django/contrib/localflavor/is_/is_postalcodes.py
  222. +8 −8 django/contrib/localflavor/it/forms.py
  223. +2 −1  django/contrib/localflavor/it/it_province.py
  224. +2 −1  django/contrib/localflavor/it/it_region.py
  225. +3 −3 django/contrib/localflavor/it/util.py
  226. +3 −1 django/contrib/localflavor/kw/forms.py
  227. +7 −7 django/contrib/localflavor/mk/forms.py
  228. +86 −84 django/contrib/localflavor/mk/mk_choices.py
  229. +36 −34 django/contrib/localflavor/mx/forms.py
  230. +33 −32 django/contrib/localflavor/mx/mx_states.py
  231. +7 −7 django/contrib/localflavor/nl/forms.py
  232. +3 −3 django/contrib/localflavor/no/forms.py
  233. +22 −21 django/contrib/localflavor/no/no_municipalities.py
  234. +3 −3 django/contrib/localflavor/pe/forms.py
  235. +26 −25 django/contrib/localflavor/pe/pe_region.py
  236. +18 −18 django/contrib/localflavor/pl/forms.py
  237. +377 −376 django/contrib/localflavor/pl/pl_administrativeunits.py
  238. +8 −6 django/contrib/localflavor/pt/forms.py
  239. +37 −36 django/contrib/localflavor/py/py_department.py
  240. +7 −7 django/contrib/localflavor/ro/forms.py
  241. +43 −42 django/contrib/localflavor/ro/ro_counties.py
  242. +4 −4 django/contrib/localflavor/ru/forms.py
  243. +3 −3 django/contrib/localflavor/se/forms.py
  244. +22 −21 django/contrib/localflavor/se/se_counties.py
  245. +3 −2 django/contrib/localflavor/se/utils.py
  246. +10 −10 django/contrib/localflavor/si/forms.py
  247. +464 −463 django/contrib/localflavor/si/si_postalcodes.py
  248. +2 −2 django/contrib/localflavor/sk/forms.py
  249. +14 −14 django/contrib/localflavor/tr/forms.py
  250. +1 −0  django/contrib/localflavor/tr/tr_provinces.py
  251. +12 −12 django/contrib/localflavor/us/forms.py
  252. +2 −2 django/contrib/localflavor/uy/forms.py
  253. +20 −19 django/contrib/localflavor/uy/uy_departaments.py
  254. +4 −3 django/contrib/localflavor/za/forms.py
  255. +10 −10 django/contrib/markup/templatetags/markup.py
  256. +13 −10 django/contrib/messages/storage/base.py
  257. +2 −1  django/contrib/messages/storage/cookie.py
  258. +5 −5 django/contrib/messages/tests/base.py
  259. +4 −4 django/contrib/messages/tests/cookie.py
  260. +4 −2 django/contrib/redirects/models.py
  261. +8 −5 django/contrib/sessions/backends/base.py
  262. +1 −0  django/contrib/sessions/backends/cache.py
  263. +1 −2  django/contrib/sessions/backends/db.py
  264. +1 −1  django/contrib/sessions/backends/file.py
  265. +1 −1  django/contrib/sessions/backends/signed_cookies.py
  266. +9 −7 django/contrib/sessions/middleware.py
  267. +26 −9 django/contrib/sessions/tests.py
  268. +7 −3 django/contrib/sitemaps/__init__.py
  269. +6 −4 django/contrib/sitemaps/tests/flatpages.py
  270. +7 −2 django/contrib/sitemaps/tests/generic.py
  271. +25 −15 django/contrib/sitemaps/tests/http.py
  272. +14 −8 django/contrib/sitemaps/tests/https.py
  273. +2 −1  django/contrib/sitemaps/views.py
  274. +5 −2 django/contrib/sites/models.py
  275. +5 −3 django/contrib/sites/tests.py
  276. +2 −1  django/contrib/staticfiles/finders.py
  277. +7 −3 django/contrib/staticfiles/handlers.py
  278. +19 −16 django/contrib/staticfiles/management/commands/collectstatic.py
  279. +7 −5 django/contrib/staticfiles/management/commands/findstatic.py
  280. +38 −19 django/contrib/staticfiles/storage.py
  281. +27 −3 django/contrib/staticfiles/templatetags/staticfiles.py
  282. +5 −2 django/contrib/staticfiles/views.py
  283. +15 −14 django/contrib/syndication/views.py
  284. +7 −5 django/contrib/webdesign/lorem_ipsum.py
  285. +3 −1 django/contrib/webdesign/templatetags/webdesign.py
  286. +3 −2 django/contrib/webdesign/tests.py
  287. +4 −1 django/core/cache/__init__.py
  288. +3 −3 django/core/cache/backends/base.py
  289. +8 −15 django/core/cache/backends/db.py
  290. +3 −2 django/core/cache/backends/filebased.py
  291. +1 −1  django/core/cache/backends/locmem.py
  292. +8 −1 django/core/cache/backends/memcached.py
  293. +7 −3 django/core/context_processors.py
  294. +3 −3 django/core/exceptions.py
  295. +15 −9 django/core/files/base.py
  296. +6 −1 django/core/files/images.py
  297. +1 −1  django/core/files/move.py
  298. +7 −4 django/core/files/storage.py
  299. +7 −3 django/core/files/uploadhandler.py
  300. +20 −20 django/core/handlers/base.py
Sorry, we could not display the entire diff because too many files (940) changed.
View
19 AUTHORS
@@ -29,6 +29,8 @@ The PRIMARY AUTHORS are (and/or have been):
* Julien Phalip
* Aymeric Augustin
* Claude Paroz
+ * Anssi Kääriäinen
+ * Florian Apolloner
More information on the main contributors to Django can be found in
docs/internals/committers.txt.
@@ -50,6 +52,7 @@ answer newbie questions, and generally made Django that much better:
Antoni Aloy
Daniel Alves Barbosa de Oliveira Vaz <danielvaz@gmail.com>
AgarFu <heaven@croasanaso.sytes.net>
+ James Aylett
Dagur Páll Ammendrup <dagurp@gmail.com>
Collin Anderson <cmawebsite@gmail.com>
Jeff Anderson <jefferya@programmerq.net>
@@ -59,7 +62,6 @@ answer newbie questions, and generally made Django that much better:
andy@jadedplanet.net
Fabrice Aneche <akh@nobugware.com>
ant9000@netwise.it
- Florian Apolloner <florian@apolloner.eu>
arien <regexbot@gmail.com>
David Ascher <http://ascher.ca/>
atlithorn <atlithorn@gmail.com>
@@ -84,6 +86,7 @@ answer newbie questions, and generally made Django that much better:
Esdras Beleza <linux@esdrasbeleza.com>
Chris Bennett <chrisrbennett@yahoo.com>
James Bennett
+ Danilo Bargen
Shai Berger <shai@platonix.com>
Julian Bez
Arvis Bickovskis <viestards.lists@gmail.com>
@@ -136,9 +139,10 @@ answer newbie questions, and generally made Django that much better:
Robert Coup
Pete Crosier <pete.crosier@gmail.com>
Matt Croydon <http://www.postneo.com/>
+ Jure Cuhalev <gandalf@owca.info>
Leah Culver <leah.culver@gmail.com>
+ Raúl Cumplido <raulcumplido@gmail.com>
flavio.curella@gmail.com
- Jure Cuhalev <gandalf@owca.info>
John D'Agostino <john.dagostino@gmail.com>
dackze+django@gmail.com
Jim Dalton <jim.dalton@gmail.com>
@@ -157,6 +161,7 @@ answer newbie questions, and generally made Django that much better:
Rajesh Dhawan <rajesh.dhawan@gmail.com>
Sander Dijkhuis <sander.dijkhuis@gmail.com>
Jordan Dimov <s3x3y1@gmail.com>
+ Riccardo Di Virgilio
Nebojša Dorđević
dne@mayonnaise.net
dready <wil@mojipage.com>
@@ -171,6 +176,7 @@ answer newbie questions, and generally made Django that much better:
Clint Ecker
Nick Efford <nick@efford.org>
eibaan@gmail.com
+ David Eklund
Julia Elman
enlight
Enrico <rico.bl@gmail.com>
@@ -219,6 +225,7 @@ answer newbie questions, and generally made Django that much better:
pradeep.gowda@gmail.com
Collin Grady <collin@collingrady.com>
Gabriel Grant <g@briel.ca>
+ Daniel Greenfeld
Simon Greenhill <dev@simon.net.nz>
Owen Griffiths
Espen Grindhaug <http://grindhaug.org/>
@@ -229,6 +236,7 @@ answer newbie questions, and generally made Django that much better:
Scot Hacker <shacker@birdhouse.org>
dAniel hAhler
hambaloney
+ Will Hardy <django@willhardy.com.au>
Brian Harring <ferringb@gmail.com>
Brant Harris
Ronny Haryanto <http://ronny.haryan.to/>
@@ -273,7 +281,6 @@ answer newbie questions, and generally made Django that much better:
jpellerin@gmail.com
junzhang.jn@gmail.com
Xia Kai <http://blog.xiaket.org/>
- Anssi Kääriäinen
Antti Kaihola <http://djangopeople.net/akaihola/>
Peter van Kampen
Bahadır Kandemir <bahadir@pardus.org.tr>
@@ -366,6 +373,7 @@ answer newbie questions, and generally made Django that much better:
michael.mcewan@gmail.com
Paul McLanahan <paul@mclanahan.net>
Tobias McNulty <http://www.caktusgroup.com/blog>
+ Andrews Medina <andrewsmedina@gmail.com>
Zain Memon
Christian Metts
michal@plovarna.cz
@@ -422,6 +430,7 @@ answer newbie questions, and generally made Django that much better:
polpak@yahoo.com
Ross Poulton <ross@rossp.org>
Mihai Preda <mihai_preda@yahoo.com>
+ Daniele Procida <daniele@vurt.org>
Matthias Pronk <django@masida.nl>
Jyrki Pulliainen <jyrki.pulliainen@gmail.com>
Thejaswi Puthraya <thejaswi.puthraya@gmail.com>
@@ -450,6 +459,7 @@ answer newbie questions, and generally made Django that much better:
Armin Ronacher
Daniel Roseman <http://roseman.org.uk/>
Rozza <ross.lawley@gmail.com>
+ Audrey Roy <http://audreymroy.com/>
Oliver Rutherfurd <http://rutherfurd.net/>
ryankanno
Gonzalo Saavedra <gonzalosaavedra@gmail.com>
@@ -458,6 +468,7 @@ answer newbie questions, and generally made Django that much better:
Vinay Sajip <vinay_sajip@yahoo.co.uk>
Bartolome Sanchez Salado <i42sasab@uco.es>
Kadesarin Sanjek
+ Tim Saylor <tim.saylor@gmail.com>
Massimo Scamarcia <massimo.scamarcia@gmail.com>
Paulo Scardine <paulo@scardine.com.br>
David Schein
@@ -502,6 +513,7 @@ answer newbie questions, and generally made Django that much better:
Aaron Swartz <http://www.aaronsw.com/>
Ville Säävuori <http://www.unessa.net/>
Mart Sõmermaa <http://mrts.pri.ee/>
+ Marc Tamlyn
Christian Tanzer <tanzer@swing.co.at>
Tyler Tarabula <tyler.tarabula@gmail.com>
Tyson Tate <tyson@fallingbullets.com>
@@ -550,6 +562,7 @@ answer newbie questions, and generally made Django that much better:
Mike Wiacek <mjwiacek@google.com>
Frank Wierzbicki
charly.wilhelm@gmail.com
+ Simon Williams
Derek Willis <http://blog.thescoop.org/>
Rachel Willmer <http://www.willmer.com/kb/>
Jakub Wilk <ubanus@users.sf.net>
View
10 django/bin/django-2to3.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+# This works exactly like 2to3, except that it uses Django's fixers rather
+# than 2to3's built-in fixers.
+
+import sys
+from lib2to3.main import main
+
+sys.exit(main("django.utils.2to3_fixes"))
+
View
10 django/conf/__init__.py
@@ -15,6 +15,7 @@
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import LazyObject, empty
from django.utils import importlib
+from django.utils import six
ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
@@ -73,7 +74,7 @@ def __setattr__(self, name, value):
elif name == "ADMIN_MEDIA_PREFIX":
warnings.warn("The ADMIN_MEDIA_PREFIX setting has been removed; "
"use STATIC_URL instead.", DeprecationWarning)
- elif name == "ALLOWED_INCLUDE_ROOTS" and isinstance(value, basestring):
+ elif name == "ALLOWED_INCLUDE_ROOTS" and isinstance(value, six.string_types):
raise ValueError("The ALLOWED_INCLUDE_ROOTS setting must be set "
"to a tuple, not a string.")
object.__setattr__(self, name, value)
@@ -102,7 +103,10 @@ def __init__(self, settings_module):
if setting == setting.upper():
setting_value = getattr(mod, setting)
if setting in tuple_settings and \
- isinstance(setting_value, basestring):
+ isinstance(setting_value, six.string_types):
+ warnings.warn("The %s setting must be a tuple. Please fix your "
+ "settings, as auto-correction is now deprecated." % setting,
+ PendingDeprecationWarning)
setting_value = (setting_value,) # In case the user forgot the comma.
setattr(self, setting, setting_value)
@@ -154,7 +158,7 @@ def __getattr__(self, name):
return getattr(self.default_settings, name)
def __dir__(self):
- return self.__dict__.keys() + dir(self.default_settings)
+ return list(self.__dict__) + dir(self.default_settings)
# For Python < 2.6:
__members__ = property(lambda self: self.__dir__())
View
12 django/conf/global_settings.py
@@ -270,19 +270,19 @@
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
# Absolute filesystem path to the directory that will hold user-uploaded files.
-# Example: "/home/media/media.lawrence.com/media/"
+# Example: "/var/www/example.com/media/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT.
-# Example: "http://media.lawrence.com/media/"
+# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = ''
-# Absolute path to the directory that holds static files.
-# Example: "/home/media/media.lawrence.com/static/"
+# Absolute path to the directory static files should be collected to.
+# Example: "/var/www/example.com/static/"
STATIC_ROOT = ''
# URL that handles the static files served from STATIC_ROOT.
-# Example: "http://media.lawrence.com/static/"
+# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = None
# List of upload handler classes to be applied in order.
@@ -451,7 +451,7 @@
SESSION_COOKIE_NAME = 'sessionid' # Cookie name. This can be whatever you want.
SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 # Age of cookie, in seconds (default: 2 weeks).
-SESSION_COOKIE_DOMAIN = None # A string like ".lawrence.com", or None for standard domain cookie.
+SESSION_COOKIE_DOMAIN = None # A string like ".example.com", or None for standard domain cookie.
SESSION_COOKIE_SECURE = False # Whether the session cookie should be secure (https:// only).
SESSION_COOKIE_PATH = '/' # The path of the session cookie.
SESSION_COOKIE_HTTPONLY = True # Whether to use the non-RFC standard httpOnly flag (IE, FF3+, others)
View
146 django/conf/locale/__init__.py
@@ -1,434 +1,436 @@
+from __future__ import unicode_literals
+
LANG_INFO = {
'ar': {
'bidi': True,
'code': 'ar',
'name': 'Arabic',
- 'name_local': u'\u0627\u0644\u0639\u0631\u0628\u064a\u0651\u0629',
+ 'name_local': '\u0627\u0644\u0639\u0631\u0628\u064a\u0651\u0629',
},
'az': {
'bidi': True,
'code': 'az',
'name': 'Azerbaijani',
- 'name_local': u'az\u0259rbaycan dili',
+ 'name_local': 'az\u0259rbaycan dili',
},
'bg': {
'bidi': False,
'code': 'bg',
'name': 'Bulgarian',
- 'name_local': u'\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438',
+ 'name_local': '\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438',
},
'bn': {
'bidi': False,
'code': 'bn',
'name': 'Bengali',
- 'name_local': u'\u09ac\u09be\u0982\u09b2\u09be',
+ 'name_local': '\u09ac\u09be\u0982\u09b2\u09be',
},
'bs': {
'bidi': False,
'code': 'bs',
'name': 'Bosnian',
- 'name_local': u'bosanski',
+ 'name_local': 'bosanski',
},
'ca': {
'bidi': False,
'code': 'ca',
'name': 'Catalan',
- 'name_local': u'catal\xe0',
+ 'name_local': 'catal\xe0',
},
'cs': {
'bidi': False,
'code': 'cs',
'name': 'Czech',
- 'name_local': u'\u010desky',
+ 'name_local': '\u010desky',
},
'cy': {
'bidi': False,
'code': 'cy',
'name': 'Welsh',
- 'name_local': u'Cymraeg',
+ 'name_local': 'Cymraeg',
},
'da': {
'bidi': False,
'code': 'da',
'name': 'Danish',
- 'name_local': u'Dansk',
+ 'name_local': 'Dansk',
},
'de': {
'bidi': False,
'code': 'de',
'name': 'German',
- 'name_local': u'Deutsch',
+ 'name_local': 'Deutsch',
},
'el': {
'bidi': False,
'code': 'el',
'name': 'Greek',
- 'name_local': u'\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac',
+ 'name_local': '\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac',
},
'en': {
'bidi': False,
'code': 'en',
'name': 'English',
- 'name_local': u'English',
+ 'name_local': 'English',
},
'en-gb': {
'bidi': False,
'code': 'en-gb',
'name': 'British English',
- 'name_local': u'British English',
+ 'name_local': 'British English',
},
'eo': {
'bidi': False,
'code': 'eo',
'name': 'Esperanto',
- 'name_local': u'Esperanto',
+ 'name_local': 'Esperanto',
},
'es': {
'bidi': False,
'code': 'es',
'name': 'Spanish',
- 'name_local': u'espa\xf1ol',
+ 'name_local': 'espa\xf1ol',
},
'es-ar': {
'bidi': False,
'code': 'es-ar',
'name': 'Argentinian Spanish',
- 'name_local': u'espa\xf1ol de Argentina',
+ 'name_local': 'espa\xf1ol de Argentina',
},
'es-mx': {
'bidi': False,
'code': 'es-mx',
'name': 'Mexican Spanish',
- 'name_local': u'espa\xf1ol de Mexico',
+ 'name_local': 'espa\xf1ol de Mexico',
},
'es-ni': {
'bidi': False,
'code': 'es-ni',
'name': 'Nicaraguan Spanish',
- 'name_local': u'espa\xf1ol de Nicaragua',
+ 'name_local': 'espa\xf1ol de Nicaragua',
},
'et': {
'bidi': False,
'code': 'et',
'name': 'Estonian',
- 'name_local': u'eesti',
+ 'name_local': 'eesti',
},
'eu': {
'bidi': False,
'code': 'eu',
'name': 'Basque',
- 'name_local': u'Basque',
+ 'name_local': 'Basque',
},
'fa': {
'bidi': True,
'code': 'fa',
'name': 'Persian',
- 'name_local': u'\u0641\u0627\u0631\u0633\u06cc',
+ 'name_local': '\u0641\u0627\u0631\u0633\u06cc',
},
'fi': {
'bidi': False,
'code': 'fi',
'name': 'Finnish',
- 'name_local': u'suomi',
+ 'name_local': 'suomi',
},
'fr': {
'bidi': False,
'code': 'fr',
'name': 'French',
- 'name_local': u'Fran\xe7ais',
+ 'name_local': 'Fran\xe7ais',
},
'fy-nl': {
'bidi': False,
'code': 'fy-nl',
'name': 'Frisian',
- 'name_local': u'Frisian',
+ 'name_local': 'Frisian',
},
'ga': {
'bidi': False,
'code': 'ga',
'name': 'Irish',
- 'name_local': u'Gaeilge',
+ 'name_local': 'Gaeilge',
},
'gl': {
'bidi': False,
'code': 'gl',
'name': 'Galician',
- 'name_local': u'galego',
+ 'name_local': 'galego',
},
'he': {
'bidi': True,
'code': 'he',
'name': 'Hebrew',
- 'name_local': u'\u05e2\u05d1\u05e8\u05d9\u05ea',
+ 'name_local': '\u05e2\u05d1\u05e8\u05d9\u05ea',
},
'hi': {
'bidi': False,
'code': 'hi',
'name': 'Hindi',
- 'name_local': u'Hindi',
+ 'name_local': 'Hindi',
},
'hr': {
'bidi': False,
'code': 'hr',
'name': 'Croatian',
- 'name_local': u'Hrvatski',
+ 'name_local': 'Hrvatski',
},
'hu': {
'bidi': False,
'code': 'hu',
'name': 'Hungarian',
- 'name_local': u'Magyar',
+ 'name_local': 'Magyar',
},
'id': {
'bidi': False,
'code': 'id',
'name': 'Indonesian',
- 'name_local': u'Bahasa Indonesia',
+ 'name_local': 'Bahasa Indonesia',
},
'is': {
'bidi': False,
'code': 'is',
'name': 'Icelandic',
- 'name_local': u'\xcdslenska',
+ 'name_local': '\xcdslenska',
},
'it': {
'bidi': False,
'code': 'it',
'name': 'Italian',
- 'name_local': u'italiano',
+ 'name_local': 'italiano',
},
'ja': {
'bidi': False,
'code': 'ja',
'name': 'Japanese',
- 'name_local': u'\u65e5\u672c\u8a9e',
+ 'name_local': '\u65e5\u672c\u8a9e',
},
'ka': {
'bidi': False,
'code': 'ka',
'name': 'Georgian',
- 'name_local': u'\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8',
+ 'name_local': '\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8',
},
'kk': {
'bidi': False,
'code': 'kk',
'name': 'Kazakh',
- 'name_local': u'\u049a\u0430\u0437\u0430\u049b',
+ 'name_local': '\u049a\u0430\u0437\u0430\u049b',
},
'km': {
'bidi': False,
'code': 'km',
'name': 'Khmer',
- 'name_local': u'Khmer',
+ 'name_local': 'Khmer',
},
'kn': {
'bidi': False,
'code': 'kn',
'name': 'Kannada',
- 'name_local': u'Kannada',
+ 'name_local': 'Kannada',
},
'ko': {
'bidi': False,
'code': 'ko',
'name': 'Korean',
- 'name_local': u'\ud55c\uad6d\uc5b4',
+ 'name_local': '\ud55c\uad6d\uc5b4',
},
'lt': {
'bidi': False,
'code': 'lt',
'name': 'Lithuanian',
- 'name_local': u'Lithuanian',
+ 'name_local': 'Lithuanian',
},
'lv': {
'bidi': False,
'code': 'lv',
'name': 'Latvian',
- 'name_local': u'latvie\u0161u',
+ 'name_local': 'latvie\u0161u',
},
'mk': {
'bidi': False,
'code': 'mk',
'name': 'Macedonian',
- 'name_local': u'\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438',
+ 'name_local': '\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438',
},
'ml': {
'bidi': False,
'code': 'ml',
'name': 'Malayalam',
- 'name_local': u'Malayalam',
+ 'name_local': 'Malayalam',
},
'mn': {
'bidi': False,
'code': 'mn',
'name': 'Mongolian',
- 'name_local': u'Mongolian',
+ 'name_local': 'Mongolian',
},
'nb': {
'bidi': False,
'code': 'nb',
'name': 'Norwegian Bokmal',
- 'name_local': u'Norsk (bokm\xe5l)',
+ 'name_local': 'Norsk (bokm\xe5l)',
},
'ne': {
'bidi': False,
'code': 'ne',
'name': 'Nepali',
- 'name_local': u'\u0928\u0947\u092a\u093e\u0932\u0940',
+ 'name_local': '\u0928\u0947\u092a\u093e\u0932\u0940',
},
'nl': {
'bidi': False,
'code': 'nl',
'name': 'Dutch',
- 'name_local': u'Nederlands',
+ 'name_local': 'Nederlands',
},
'nn': {
'bidi': False,
'code': 'nn',
'name': 'Norwegian Nynorsk',
- 'name_local': u'Norsk (nynorsk)',
+ 'name_local': 'Norsk (nynorsk)',
},
'no': {
'bidi': False,
'code': 'no',
'name': 'Norwegian',
- 'name_local': u'Norsk',
+ 'name_local': 'Norsk',
},
'pa': {
'bidi': False,
'code': 'pa',
'name': 'Punjabi',
- 'name_local': u'Punjabi',
+ 'name_local': 'Punjabi',
},
'pl': {
'bidi': False,
'code': 'pl',
'name': 'Polish',
- 'name_local': u'polski',
+ 'name_local': 'polski',
},
'pt': {
'bidi': False,
'code': 'pt',
'name': 'Portuguese',
- 'name_local': u'Portugu\xeas',
+ 'name_local': 'Portugu\xeas',
},
'pt-br': {
'bidi': False,
'code': 'pt-br',
'name': 'Brazilian Portuguese',
- 'name_local': u'Portugu\xeas Brasileiro',
+ 'name_local': 'Portugu\xeas Brasileiro',
},
'ro': {
'bidi': False,
'code': 'ro',
'name': 'Romanian',
- 'name_local': u'Rom\xe2n\u0103',
+ 'name_local': 'Rom\xe2n\u0103',
},
'ru': {
'bidi': False,
'code': 'ru',
'name': 'Russian',
- 'name_local': u'\u0420\u0443\u0441\u0441\u043a\u0438\u0439',
+ 'name_local': '\u0420\u0443\u0441\u0441\u043a\u0438\u0439',
},
'sk': {
'bidi': False,
'code': 'sk',
'name': 'Slovak',
- 'name_local': u'slovensk\xfd',
+ 'name_local': 'slovensk\xfd',
},
'sl': {
'bidi': False,
'code': 'sl',
'name': 'Slovenian',
- 'name_local': u'Sloven\u0161\u010dina',
+ 'name_local': 'Sloven\u0161\u010dina',
},
'sq': {
'bidi': False,
'code': 'sq',
'name': 'Albanian',
- 'name_local': u'Albanian',
+ 'name_local': 'Albanian',
},
'sr': {
'bidi': False,
'code': 'sr',
'name': 'Serbian',
- 'name_local': u'\u0441\u0440\u043f\u0441\u043a\u0438',
+ 'name_local': '\u0441\u0440\u043f\u0441\u043a\u0438',
},
'sr-latn': {
'bidi': False,
'code': 'sr-latn',
'name': 'Serbian Latin',
- 'name_local': u'srpski (latinica)',
+ 'name_local': 'srpski (latinica)',
},
'sv': {
'bidi': False,
'code': 'sv',
'name': 'Swedish',
- 'name_local': u'Svenska',
+ 'name_local': 'Svenska',
},
'sw': {
'bidi': False,
'code': 'sw',
'name': 'Swahili',
- 'name_local': u'Kiswahili',
+ 'name_local': 'Kiswahili',
},
'ta': {
'bidi': False,
'code': 'ta',
'name': 'Tamil',
- 'name_local': u'\u0ba4\u0bae\u0bbf\u0bb4\u0bcd',
+ 'name_local': '\u0ba4\u0bae\u0bbf\u0bb4\u0bcd',
},
'te': {
'bidi': False,
'code': 'te',
'name': 'Telugu',
- 'name_local': u'\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41',
+ 'name_local': '\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41',
},
'th': {
'bidi': False,
'code': 'th',
'name': 'Thai',
- 'name_local': u'Thai',
+ 'name_local': 'Thai',
},
'tr': {
'bidi': False,
'code': 'tr',
'name': 'Turkish',
- 'name_local': u'T\xfcrk\xe7e',
+ 'name_local': 'T\xfcrk\xe7e',
},
'tt': {
'bidi': False,
'code': 'tt',
'name': 'Tatar',
- 'name_local': u'\u0422\u0430\u0442\u0430\u0440\u0447\u0430',
+ 'name_local': '\u0422\u0430\u0442\u0430\u0440\u0447\u0430',
},
'uk': {
'bidi': False,
'code': 'uk',
'name': 'Ukrainian',
- 'name_local': u'\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430',
+ 'name_local': '\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430',
},
'ur': {
'bidi': False,
'code': 'ur',
'name': 'Urdu',
- 'name_local': u'\u0627\u0631\u062f\u0648',
+ 'name_local': '\u0627\u0631\u062f\u0648',
},
'vi': {
'bidi': False,
'code': 'vi',
'name': 'Vietnamese',
- 'name_local': u'Vietnamese',
+ 'name_local': 'Vietnamese',
},
'zh-cn': {
'bidi': False,
'code': 'zh-cn',
'name': 'Simplified Chinese',
- 'name_local': u'\u7b80\u4f53\u4e2d\u6587',
+ 'name_local': '\u7b80\u4f53\u4e2d\u6587',
},
'zh-tw': {
'bidi': False,
'code': 'zh-tw',
'name': 'Traditional Chinese',
- 'name_local': u'\u7e41\u9ad4\u4e2d\u6587',
+ 'name_local': '\u7e41\u9ad4\u4e2d\u6587',
}
}
View
1  django/conf/locale/ar/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
3  django/conf/locale/bg/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -19,5 +20,5 @@
# TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING =
View
3  django/conf/locale/cs/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -33,5 +34,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
4 django/conf/locale/en/formats.py
@@ -37,7 +37,7 @@
'%m/%d/%y %H:%M', # '10/25/06 14:30'
'%m/%d/%y', # '10/25/06'
)
-DECIMAL_SEPARATOR = u'.'
-THOUSAND_SEPARATOR = u','
+DECIMAL_SEPARATOR = '.'
+THOUSAND_SEPARATOR = ','
NUMBER_GROUPING = 3
View
3  django/conf/locale/es_MX/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
DATE_FORMAT = r'j \d\e F \d\e Y'
TIME_FORMAT = 'H:i:s'
@@ -24,5 +25,5 @@
'%d/%m/%y %H:%M',
)
DECIMAL_SEPARATOR = '.' # ',' is also official (less common): NOM-008-SCFI-2002
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
3  django/conf/locale/et/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -19,5 +20,5 @@
# TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING =
View
1  django/conf/locale/fa/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
5 django/conf/locale/fi/formats.py
@@ -1,12 +1,13 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y'
TIME_FORMAT = 'G.i.s'
-# DATETIME_FORMAT =
+DATETIME_FORMAT = r'j. E Y \k\e\l\l\o G.i.s'
YEAR_MONTH_FORMAT = 'F Y'
MONTH_DAY_FORMAT = 'j. F'
SHORT_DATE_FORMAT = 'j.n.Y'
@@ -19,5 +20,5 @@
# TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
# NUMBER_GROUPING =
View
3  django/conf/locale/fr/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -37,5 +38,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
15 django/conf/locale/gl/formats.py
@@ -1,17 +1,18 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# 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'
+DATE_FORMAT = r'j \d\e F \d\e 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 =
+DATETIME_FORMAT = r'j \d\e F \d\e Y \s H:i'
+YEAR_MONTH_FORMAT = r'F \d\e Y'
+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
# The *_INPUT_FORMATS strings use the Python strftime format syntax,
# see http://docs.python.org/library/datetime.html#strftime-strptime-behavior
View
1  django/conf/locale/he/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
3  django/conf/locale/hu/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -28,5 +29,5 @@
'%Y.%m.%d.', # '2006.10.25.'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
NUMBER_GROUPING = 3
View
1  django/conf/locale/ja/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
1  django/conf/locale/km/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
1  django/conf/locale/ko/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
3  django/conf/locale/lv/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -37,5 +38,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u' ' # Non-breaking space
+THOUSAND_SEPARATOR = ' ' # Non-breaking space
NUMBER_GROUPING = 3
View
3  django/conf/locale/nb/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -39,5 +40,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
3  django/conf/locale/nn/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -39,5 +40,5 @@
'%d.%m.%y', # '25.10.06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
3  django/conf/locale/pl/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -33,5 +34,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u' '
+THOUSAND_SEPARATOR = ' '
NUMBER_GROUPING = 3
View
1  django/conf/locale/pt_BR/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
3  django/conf/locale/ru/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -36,5 +37,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
3  django/conf/locale/sk/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -33,5 +34,5 @@
'%Y-%m-%d', # '2006-10-25'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
3  django/conf/locale/sv/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
@@ -36,5 +37,5 @@
'%m/%d/%y', # '10/25/06'
)
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u'\xa0' # non-breaking space
+THOUSAND_SEPARATOR = '\xa0' # non-breaking space
NUMBER_GROUPING = 3
View
4 django/conf/locale/uk/formats.py
@@ -2,6 +2,8 @@
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
+
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j E Y р.'
@@ -19,5 +21,5 @@
# TIME_INPUT_FORMATS =
# DATETIME_INPUT_FORMATS =
DECIMAL_SEPARATOR = ','
-THOUSAND_SEPARATOR = u' '
+THOUSAND_SEPARATOR = ' '
# NUMBER_GROUPING =
View
1  django/conf/locale/vi/formats.py
@@ -1,6 +1,7 @@
# -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
+from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
View
8 django/conf/project_template/project_name/settings.py
@@ -44,22 +44,22 @@
USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
-# Example: "/home/media/media.lawrence.com/media/"
+# Example: "/var/www/example.com/media/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
-# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
+# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL = ''
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
-# Example: "/home/media/media.lawrence.com/static/"
+# Example: "/var/www/example.com/static/"
STATIC_ROOT = ''
# URL prefix for static files.
-# Example: "http://media.lawrence.com/static/"
+# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
# Additional locations of static files
View
5 django/conf/urls/__init__.py
@@ -2,6 +2,7 @@
RegexURLResolver, LocaleRegexURLResolver)
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
+from django.utils import six
__all__ = ['handler403', 'handler404', 'handler500', 'include', 'patterns', 'url']
@@ -20,7 +21,7 @@ def include(arg, namespace=None, app_name=None):
# No namespace hint - use manually provided namespace
urlconf_module = arg
- if isinstance(urlconf_module, basestring):
+ if isinstance(urlconf_module, six.string_types):
urlconf_module = import_module(urlconf_module)
patterns = getattr(urlconf_module, 'urlpatterns', urlconf_module)
@@ -52,7 +53,7 @@ def url(regex, view, kwargs=None, name=None, prefix=''):
urlconf_module, app_name, namespace = view
return RegexURLResolver(regex, urlconf_module, kwargs, app_name=app_name, namespace=namespace)
else:
- if isinstance(view, basestring):
+ if isinstance(view, six.string_types):
if not view:
raise ImproperlyConfigured('Empty URL pattern view name not permitted (for pattern %r)' % regex)
if prefix:
View
4 django/conf/urls/i18n.py
@@ -1,5 +1,5 @@
from django.conf import settings
-from django.conf.urls import patterns
+from django.conf.urls import patterns, url
from django.core.urlresolvers import LocaleRegexURLResolver
def i18n_patterns(prefix, *args):
@@ -16,5 +16,5 @@ def i18n_patterns(prefix, *args):
urlpatterns = patterns('',
- (r'^setlang/$', 'django.views.i18n.set_language'),
+ url(r'^setlang/$', 'django.views.i18n.set_language', name='set_language'),
)
View
8 django/contrib/admin/actions.py
@@ -7,7 +7,7 @@
from django.contrib.admin.util import get_deleted_objects, model_ngettext
from django.db import router
from django.template.response import TemplateResponse
-from django.utils.encoding import force_unicode
+from django.utils.encoding import force_text
from django.utils.translation import ugettext_lazy, ugettext as _
def delete_selected(modeladmin, request, queryset):
@@ -42,7 +42,7 @@ def delete_selected(modeladmin, request, queryset):
n = queryset.count()
if n:
for obj in queryset:
- obj_display = force_unicode(obj)
+ obj_display = force_text(obj)
modeladmin.log_deletion(request, obj, obj_display)
queryset.delete()
modeladmin.message_user(request, _("Successfully deleted %(count)d %(items)s.") % {
@@ -52,9 +52,9 @@ def delete_selected(modeladmin, request, queryset):
return None
if len(queryset) == 1:
- objects_name = force_unicode(opts.verbose_name)
+ objects_name = force_text(opts.verbose_name)
else:
- objects_name = force_unicode(opts.verbose_name_plural)
+ objects_name = force_text(opts.verbose_name_plural)
if perms_needed or protected:
title = _("Cannot delete %(name)s") % {"name": objects_name}
View
8 django/contrib/admin/filters.py
@@ -9,7 +9,7 @@
from django.db import models
from django.core.exceptions import ImproperlyConfigured
-from django.utils.encoding import smart_unicode
+from django.utils.encoding import smart_text
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
@@ -195,7 +195,7 @@ def choices(self, cl):
}
for pk_val, val in self.lookup_choices:
yield {
- 'selected': self.lookup_val == smart_unicode(pk_val),
+ 'selected': self.lookup_val == smart_text(pk_val),
'query_string': cl.get_query_string({
self.lookup_kwarg: pk_val,
}, [self.lookup_kwarg_isnull]),
@@ -272,7 +272,7 @@ def choices(self, cl):
}
for lookup, title in self.field.flatchoices:
yield {
- 'selected': smart_unicode(lookup) == self.lookup_val,
+ 'selected': smart_text(lookup) == self.lookup_val,
'query_string': cl.get_query_string({
self.lookup_kwarg: lookup}),
'display': title,
@@ -381,7 +381,7 @@ def choices(self, cl):
if val is None:
include_none = True
continue
- val = smart_unicode(val)
+ val = smart_text(val)
yield {
'selected': self.lookup_val == val,
'query_string': cl.get_query_string({
View
5 django/contrib/admin/forms.py
@@ -1,9 +1,10 @@
+from __future__ import unicode_literals
+
from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth.models import User
-
from django.utils.translation import ugettext_lazy, ugettext as _
ERROR_MESSAGE = ugettext_lazy("Please enter the correct username and password "
@@ -26,7 +27,7 @@ def clean(self):
if username and password:
self.user_cache = authenticate(username=username, password=password)
if self.user_cache is None:
- if u'@' in username:
+ if '@' in username:
# Mistakenly entered e-mail address instead of username? Look it up.
try:
user = User.objects.get(email=username)
View
43 django/contrib/admin/helpers.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
from django import forms
from django.contrib.admin.util import (flatten_fieldsets, lookup_field,
display_for_field, label_for_field, help_text_for_field)
@@ -7,9 +9,10 @@
from django.db.models.fields.related import ManyToManyRel
from django.forms.util import flatatt
from django.template.defaultfilters import capfirst
-from django.utils.encoding import force_unicode, smart_unicode
-from django.utils.html import escape, conditional_escape
+from django.utils.encoding import force_text, smart_text
+from django.utils.html import conditional_escape, format_html
from django.utils.safestring import mark_safe
+from django.utils import six
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
@@ -47,7 +50,7 @@ def first_field(self):
try:
fieldset_name, fieldset_options = self.fieldsets[0]
field_name = fieldset_options['fields'][0]
- if not isinstance(field_name, basestring):
+ if not isinstance(field_name, six.string_types):
field_name = field_name[0]
return self.form[field_name]
except (KeyError, IndexError):
@@ -69,7 +72,7 @@ def __init__(self, form, name=None, readonly_fields=(), fields=(), classes=(),
description=None, model_admin=None):
self.form = form
self.name, self.fields = name, fields
- self.classes = u' '.join(classes)
+ self.classes = ' '.join(classes)
self.description = description
self.model_admin = model_admin
self.readonly_fields = readonly_fields
@@ -91,7 +94,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
- if not hasattr(field, "__iter__"):
+ if not hasattr(field, "__iter__") or isinstance(field, six.text_type):
self.fields = [field]
else:
self.fields = field
@@ -109,7 +112,7 @@ def __iter__(self):
yield AdminField(self.form, field, is_first=(i == 0))
def errors(self):
- return mark_safe(u'\n'.join([self.form[f].errors.as_ul() for f in self.fields if f not in self.readonly_fields]).strip('\n'))
+ return mark_safe('\n'.join([self.form[f].errors.as_ul() for f in self.fields if f not in self.readonly_fields]).strip('\n'))
class AdminField(object):
def __init__(self, form, field, is_first):
@@ -119,16 +122,16 @@ def __init__(self, form, field, is_first):
def label_tag(self):
classes = []
- contents = conditional_escape(force_unicode(self.field.label))
+ contents = conditional_escape(force_text(self.field.label))
if self.is_checkbox:
- classes.append(u'vCheckboxLabel')
+ classes.append('vCheckboxLabel')
else:
- contents += u':'
+ contents += ':'
if self.field.field.required:
- classes.append(u'required')
+ classes.append('required')
if not self.is_first:
- classes.append(u'inline')
- attrs = classes and {'class': u' '.join(classes)} or {}
+ classes.append('inline')
+ attrs = classes and {'class': ' '.join(classes)} or {}
return self.field.label_tag(contents=mark_safe(contents), attrs=attrs)
def errors(self):
@@ -161,11 +164,9 @@ def label_tag(self):
if not self.is_first:
attrs["class"] = "inline"
label = self.field['label']
- contents = capfirst(force_unicode(escape(label))) + u":"
- return mark_safe('<label%(attrs)s>%(contents)s</label>' % {
- "attrs": flatatt(attrs),
- "contents": contents,
- })
+ return format_html('<label{0}>{1}:</label>',
+ flatatt(attrs),
+ capfirst(force_text(label)))
def contents(self):
from django.contrib.admin.templatetags.admin_list import _boolean_icon
@@ -181,14 +182,14 @@ def contents(self):
if boolean:
result_repr = _boolean_icon(value)
else:
- result_repr = smart_unicode(value)
+ result_repr = smart_text(value)
if getattr(attr, "allow_tags", False):
result_repr = mark_safe(result_repr)
else:
if value is None:
result_repr = EMPTY_CHANGELIST_VALUE
elif isinstance(f.rel, ManyToManyRel):
- result_repr = ", ".join(map(unicode, value.all()))
+ result_repr = ", ".join(map(six.text_type, value.all()))
else:
result_repr = display_for_field(value, f)
return conditional_escape(result_repr)
@@ -324,11 +325,11 @@ class AdminErrorList(forms.util.ErrorList):
"""
def __init__(self, form, inline_formsets):
if form.is_bound:
- self.extend(form.errors.values())
+ self.extend(list(six.itervalues(form.errors)))
for inline_formset in inline_formsets:
self.extend(inline_formset.non_form_errors())
for errors_in_inline_form in inline_formset.errors:
- self.extend(errors_in_inline_form.values())
+ self.extend(list(six.itervalues(errors_in_inline_form)))
def normalize_fieldsets(fieldsets):
"""
View
15 django/contrib/admin/models.py
@@ -1,10 +1,12 @@
+from __future__ import unicode_literals
+
from django.db import models
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.contrib.admin.util import quote
from django.utils.translation import ugettext_lazy as _
-from django.utils.encoding import smart_unicode
-from django.utils.safestring import mark_safe
+from django.utils.encoding import smart_text
+from django.utils.encoding import python_2_unicode_compatible
ADDITION = 1
CHANGE = 2
@@ -13,10 +15,11 @@
class LogEntryManager(models.Manager):
def log_action(self, user_id, content_type_id, object_id, object_repr, action_flag, change_message=''):
- e = self.model(None, None, user_id, content_type_id, smart_unicode(object_id), object_repr[:200], action_flag, change_message)
+ e = self.model(None, None, user_id, content_type_id, smart_text(object_id), object_repr[:200], action_flag, change_message)
e.save()
+@python_2_unicode_compatible
class LogEntry(models.Model):
action_time = models.DateTimeField(_('action time'), auto_now=True)
user = models.ForeignKey(settings.AUTH_USER_MODEL)
@@ -35,9 +38,9 @@ class Meta:
ordering = ('-action_time',)
def __repr__(self):
- return smart_unicode(self.action_time)
+ return smart_text(self.action_time)
- def __unicode__(self):
+ def __str__(self):
if self.action_flag == ADDITION:
return _('Added "%(object)s".') % {'object': self.object_repr}
elif self.action_flag == CHANGE:
@@ -66,5 +69,5 @@ def get_admin_url(self):
This is relative to the Django admin index page.
"""
if self.content_type and self.object_id:
- return mark_safe(u"%s/%s/%s/" % (self.content_type.app_label, self.content_type.model, quote(self.object_id)))
+ return "%s/%s/%s/" % (self.content_type.app_label, self.content_type.model, quote(self.object_id))
return None