Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into schema-alteration

Conflicts:
	django/db/backends/__init__.py
	django/db/models/fields/related.py
	django/db/models/options.py
  • Loading branch information...
commit 6a632e04578776e877adc5e2dc53f008c890a0d4 2 parents a589fdf + fabe9c9
@andrewgodwin andrewgodwin authored
Showing with 7,123 additions and 6,146 deletions.
  1. +4 −0 .gitignore
  2. +2 −0  .hgignore
  3. +1 −1  .tx/config
  4. +3 −0  AUTHORS
  5. +16 −0 CONTRIBUTING.rst
  6. +2 −0  MANIFEST.in
  7. +24 −17 django/conf/__init__.py
  8. +5 −28 django/conf/global_settings.py
  9. 0  {tests/regressiontests/localflavor/za → django/conf/locale/de_CH}/__init__.py
  10. +1 −1  django/{contrib/localflavor → conf/locale}/de_CH/formats.py
  11. +139 −153 django/conf/locale/en/LC_MESSAGES/django.po
  12. +4 −0 django/conf/project_template/project_name/wsgi.py
  13. +2 −13 django/contrib/admin/forms.py
  14. +168 −177 django/contrib/admin/locale/en/LC_MESSAGES/django.po
  15. +4 −2 django/contrib/admin/models.py
  16. +110 −48 django/contrib/admin/options.py
  17. +20 −14 django/contrib/admin/sites.py
  18. +1 −1  django/contrib/admin/templates/admin/500.html
  19. +1 −1  django/contrib/admin/templates/admin/auth/user/change_password.html
  20. +1 −1  django/contrib/admin/templates/admin/base.html
  21. +1 −1  django/contrib/admin/templates/admin/change_form.html
  22. +1 −1  django/contrib/admin/templates/admin/login.html
  23. +1 −1  django/contrib/admin/templates/admin/object_history.html
  24. +3 −3 django/contrib/admin/templates/admin/submit_line.html
  25. +1 −1  django/contrib/admin/templates/registration/password_reset_done.html
  26. +2 −2 django/contrib/admin/templates/registration/password_reset_email.html
  27. +2 −2 django/contrib/admin/templates/registration/password_reset_form.html
  28. +5 −1 django/contrib/admin/templatetags/admin_modify.py
  29. +2 −2 django/contrib/admin/tests.py
  30. +10 −3 django/contrib/admin/util.py
  31. +1 −0  django/contrib/admin/views/decorators.py
  32. +6 −1 django/contrib/admin/views/main.py
  33. +53 −44 django/contrib/admindocs/locale/en/LC_MESSAGES/django.po
  34. +1 −1  django/contrib/admindocs/tests/__init__.py
  35. +44 −2 django/contrib/auth/__init__.py
  36. +7 −9 django/contrib/auth/admin.py
  37. +18 −10 django/contrib/auth/backends.py
  38. +16 −0 django/contrib/auth/context_processors.py
  39. +14 −0 django/contrib/auth/fixtures/custom_user.json
  40. +20 −10 django/contrib/auth/forms.py
  41. +56 −0 django/contrib/auth/handlers/modwsgi.py
  42. +73 −65 django/contrib/auth/locale/en/LC_MESSAGES/django.po
  43. +57 −16 django/contrib/auth/management/__init__.py
  44. +10 −6 django/contrib/auth/management/commands/changepassword.py
  45. +83 −72 django/contrib/auth/management/commands/createsuperuser.py
  46. +2 −2 django/contrib/auth/middleware.py
  47. +116 −70 django/contrib/auth/models.py
  48. +1 −0  django/contrib/auth/signals.py
  49. +14 −24 django/contrib/auth/tests/__init__.py
  50. +82 −17 django/contrib/auth/tests/auth_backends.py
  51. +38 −7 django/contrib/auth/tests/basic.py
  52. +74 −2 django/contrib/auth/tests/context_processors.py
  53. +90 −0 django/contrib/auth/tests/custom_user.py
  54. +3 −1 django/contrib/auth/tests/decorators.py
  55. +25 −2 django/contrib/auth/tests/forms.py
  56. +50 −0 django/contrib/auth/tests/handlers.py
  57. +140 −1 django/contrib/auth/tests/management.py
  58. +6 −0 django/contrib/auth/tests/models.py
  59. +4 −0 django/contrib/auth/tests/remote_user.py
  60. +33 −2 django/contrib/auth/tests/signals.py
  61. +4 −0 django/contrib/auth/tests/templates/context_processors/auth_attrs_perm_in_perms.html
  62. +3 −0  django/contrib/auth/tests/templates/context_processors/auth_attrs_perms.html
  63. +1 −1  django/contrib/auth/tests/templates/registration/password_reset_done.html
  64. +2 −0  django/contrib/auth/tests/tokens.py
  65. +6 −0 django/contrib/auth/tests/urls.py
  66. +9 −0 django/contrib/auth/tests/utils.py
  67. +67 −0 django/contrib/auth/tests/views.py
  68. +1 −0  django/contrib/auth/tokens.py
  69. +15 −6 django/contrib/auth/views.py
  70. +12 −1 django/contrib/comments/admin.py
  71. +9 −12 django/contrib/comments/feeds.py
  72. +33 −33 django/contrib/comments/locale/en/LC_MESSAGES/django.po
  73. +27 −22 django/contrib/comments/models.py
  74. +2 −2 django/contrib/comments/moderation.py
  75. +12 −13 django/contrib/comments/views/comments.py
  76. +7 −7 django/contrib/contenttypes/locale/en/LC_MESSAGES/django.po
  77. +2 −3 django/contrib/contenttypes/tests.py
  78. +15 −11 django/contrib/flatpages/locale/en/LC_MESSAGES/django.po
  79. +6 −1 django/contrib/flatpages/templatetags/flatpages.py
  80. +8 −6 django/contrib/flatpages/views.py
  81. +1 −1  django/contrib/formtools/locale/en/LC_MESSAGES/django.po
  82. +5 −7 django/contrib/formtools/tests/__init__.py
  83. +4 −1 django/contrib/formtools/tests/wizard/cookiestorage.py
  84. +6 −0 django/contrib/gis/__init__.py
  85. +14 −2 django/contrib/gis/admin/widgets.py
  86. +12 −1 django/contrib/gis/db/backends/base.py
  87. +1 −1  django/contrib/gis/db/backends/mysql/operations.py
  88. +1 −1  django/contrib/gis/db/backends/oracle/operations.py
  89. +3 −2 django/contrib/gis/db/backends/postgis/adapter.py
  90. +21 −10 django/contrib/gis/db/backends/postgis/creation.py
  91. +28 −9 django/contrib/gis/db/backends/postgis/operations.py
  92. +3 −1 django/contrib/gis/db/backends/spatialite/operations.py
  93. +2 −2 django/contrib/gis/db/models/fields.py
  94. +2 −1  django/contrib/gis/db/models/proxy.py
  95. +7 −5 django/contrib/gis/db/models/query.py
  96. +11 −9 django/contrib/gis/db/models/sql/compiler.py
  97. +2 −2 django/contrib/gis/gdal/__init__.py
  98. +8 −4 django/contrib/gis/gdal/datasource.py
  99. +2 −1  django/contrib/gis/gdal/driver.py
  100. +1 −1  django/contrib/gis/gdal/envelope.py
  101. +23 −11 django/contrib/gis/gdal/feature.py
  102. +17 −9 django/contrib/gis/gdal/field.py
  103. +10 −13 django/contrib/gis/gdal/geometries.py
  104. +10 −7 django/contrib/gis/gdal/layer.py
  105. +27 −17 django/contrib/gis/gdal/libgdal.py
  106. +1 −1  django/contrib/gis/gdal/prototypes/ds.py
  107. +1 −1  django/contrib/gis/gdal/prototypes/errcheck.py
  108. +10 −4 django/contrib/gis/gdal/prototypes/generation.py
  109. +5 −5 django/contrib/gis/gdal/prototypes/geom.py
  110. +7 −7 django/contrib/gis/gdal/prototypes/srs.py
  111. +13 −9 django/contrib/gis/gdal/srs.py
  112. +11 −6 django/contrib/gis/gdal/tests/test_ds.py
  113. +4 −11 django/contrib/gis/gdal/tests/test_geom.py
  114. +2 −3 django/contrib/gis/geometry/test_data.py
  115. +14 −4 django/contrib/gis/geos/factory.py
  116. +67 −39 django/contrib/gis/geos/geometry.py
  117. +13 −6 django/contrib/gis/geos/libgeos.py
  118. +15 −18 django/contrib/gis/geos/prototypes/io.py
  119. +18 −5 django/contrib/gis/geos/prototypes/topology.py
  120. +67 −42 django/contrib/gis/geos/tests/test_geos.py
  121. +20 −15 django/contrib/gis/geos/tests/test_io.py
  122. +18 −18 django/contrib/gis/locale/en/LC_MESSAGES/django.po
  123. +3 −1 django/contrib/gis/templates/gis/admin/openlayers.js
  124. BIN  django/contrib/gis/tests/data/ch-city/ch-city.dbf
  125. +1 −0  django/contrib/gis/tests/data/ch-city/ch-city.prj
  126. BIN  django/contrib/gis/tests/data/ch-city/ch-city.shp
  127. BIN  django/contrib/gis/tests/data/ch-city/ch-city.shx
  128. +121 −0 django/contrib/gis/tests/data/geometries.json
  129. BIN  django/contrib/gis/tests/data/geometries.json.gz
  130. +1 −1  django/contrib/gis/tests/distapp/tests.py
  131. +87 −52 django/contrib/gis/tests/geo3d/tests.py
  132. +3 −2 django/contrib/gis/tests/geoapp/test_regress.py
  133. +31 −16 django/contrib/gis/tests/geoapp/tests.py
  134. +20 −2 django/contrib/gis/tests/inspectapp/tests.py
  135. +42 −1 django/contrib/gis/tests/layermap/tests.py
  136. +9 −7 django/contrib/gis/utils/layermapping.py
  137. +0 −2  django/contrib/gis/utils/ogrinspect.py
  138. +48 −48 django/contrib/humanize/locale/en/LC_MESSAGES/django.po
  139. +2 −0  django/contrib/localflavor/__init__.py
  140. +211 −188 django/contrib/localflavor/locale/en/LC_MESSAGES/django.po
  141. +2 −2 django/contrib/messages/locale/en/LC_MESSAGES/django.po
  142. +7 −7 django/contrib/redirects/locale/en/LC_MESSAGES/django.po
  143. +4 −2 django/contrib/redirects/middleware.py
  144. +1 −1  django/contrib/sessions/locale/en/LC_MESSAGES/django.po
  145. +6 −0 django/contrib/sessions/tests.py
  146. +2 −0  django/contrib/sitemaps/tests/base.py
  147. +1 −1  django/contrib/sitemaps/tests/generic.py
  148. +7 −7 django/contrib/sitemaps/tests/http.py
  149. +4 −4 django/contrib/sitemaps/tests/https.py
  150. +5 −5 django/contrib/sites/locale/en/LC_MESSAGES/django.po
  151. +9 −0 django/contrib/syndication/views.py
  152. +12 −1 django/core/exceptions.py
  153. +4 −1 django/core/files/storage.py
  154. +6 −5 django/core/handlers/base.py
  155. +2 −7 django/core/handlers/wsgi.py
  156. +2 −0  django/core/mail/backends/locmem.py
  157. +4 −0 django/core/mail/message.py
  158. +4 −2 django/core/management/__init__.py
  159. +7 −1 django/core/management/commands/loaddata.py
  160. +1 −1  django/core/management/commands/runserver.py
  161. +1 −0  django/core/management/commands/sqlall.py
  162. +1 −1  django/core/management/commands/syncdb.py
  163. +1 −0  django/core/management/commands/validate.py
  164. +12 −5 django/core/management/sql.py
  165. +1 −1  django/core/management/templates.py
  166. +34 −5 django/core/management/validation.py
  167. +11 −1 django/core/serializers/python.py
  168. +1 −33 django/core/servers/basehttp.py
  169. +23 −14 django/core/validators.py
  170. +6 −2 django/db/backends/__init__.py
  171. +8 −8 django/db/backends/creation.py
  172. +1 −1  django/db/backends/mysql/base.py
  173. +2 −2 django/db/backends/postgresql_psycopg2/base.py
  174. +5 −5 django/db/backends/sqlite3/creation.py
  175. +2 −2 django/db/backends/util.py
  176. +14 −6 django/db/models/base.py
  177. +57 −6 django/db/models/deletion.py
  178. +23 −7 django/db/models/expressions.py
  179. +1 −1  django/db/models/fields/__init__.py
  180. +46 −18 django/db/models/fields/related.py
  181. +39 −1 django/db/models/manager.py
  182. +32 −13 django/db/models/options.py
  183. +26 −0 django/db/models/query.py
  184. +18 −4 django/db/models/sql/compiler.py
  185. +16 −6 django/db/models/sql/expressions.py
  186. +24 −7 django/db/models/sql/query.py
  187. +40 −5 django/db/models/sql/subqueries.py
  188. +9 −17 django/db/utils.py
  189. +3 −0  django/dispatch/dispatcher.py
  190. +2 −2 django/forms/fields.py
  191. +5 −1 django/forms/formsets.py
  192. +1 −1  django/forms/models.py
  193. +10 −812 django/http/__init__.py
  194. +83 −0 django/http/cookie.py
  195. +453 −0 django/http/request.py
  196. +441 −0 django/http/response.py
  197. +13 −4 django/http/utils.py
  198. +13 −8 django/middleware/common.py
  199. +3 −2 django/middleware/csrf.py
  200. +15 −9 django/middleware/gzip.py
  201. +1 −1  django/middleware/http.py
  202. +1 −1  django/template/defaultfilters.py
  203. +1 −1  django/template/defaulttags.py
  204. +7 −6 django/templatetags/i18n.py
  205. +2 −1  django/test/__init__.py
  206. +19 −3 django/test/client.py
  207. +49 −91 django/test/testcases.py
  208. +103 −2 django/test/utils.py
  209. +2 −1  django/utils/cache.py
  210. +3 −0  django/utils/datastructures.py
  211. +2 −2 django/utils/dateformat.py
  212. +6 −18 django/utils/encoding.py
  213. +10 −0 django/utils/functional.py
  214. +15 −18 django/utils/html.py
  215. +1 −2  django/utils/http.py
  216. +46 −6 django/utils/log.py
  217. +2 −5 django/utils/numberformat.py
  218. +31 −0 django/utils/text.py
  219. +11 −8 django/utils/translation/trans_real.py
  220. +1 −1  django/utils/version.py
  221. +13 −9 django/views/debug.py
  222. +1 −1  django/views/decorators/cache.py
  223. +2 −2 django/views/decorators/http.py
  224. +13 −5 django/views/defaults.py
  225. +4 −3 django/views/generic/base.py
  226. +3 −3 django/views/generic/dates.py
  227. +4 −4 django/views/static.py
  228. +12 −1 docs/faq/admin.txt
  229. +0 −45 docs/howto/apache-auth.txt
  230. +7 −0 docs/howto/custom-model-fields.txt
  231. +0 −2  docs/howto/custom-template-tags.txt
  232. +130 −0 docs/howto/deployment/wsgi/apache-auth.txt
  233. +1 −0  docs/howto/deployment/wsgi/index.txt
  234. +24 −4 docs/howto/deployment/wsgi/modwsgi.txt
  235. +0 −4 docs/howto/error-reporting.txt
  236. +0 −1  docs/howto/index.txt
  237. +4 −3 docs/howto/jython.txt
  238. +2 −2 docs/howto/outputting-csv.txt
  239. +3 −3 docs/howto/outputting-pdf.txt
  240. +0 −2  docs/howto/static-files.txt
  241. +1 −2  docs/index.txt
  242. +12 −0 docs/internals/committers.txt
  243. +9 −1 docs/internals/contributing/committing-code.txt
  244. +1 −1  docs/internals/contributing/localizing.txt
  245. +0 −9 docs/internals/contributing/triaging-tickets.txt
  246. +3 −3 docs/internals/contributing/writing-code/coding-style.txt
  247. +20 −0 docs/internals/contributing/writing-code/unit-tests.txt
  248. +3 −2 docs/internals/contributing/writing-documentation.txt
  249. +12 −5 docs/internals/deprecation.txt
  250. +13 −3 docs/intro/tutorial02.txt
  251. +261 −268 docs/intro/tutorial03.txt
  252. +21 −87 docs/intro/tutorial04.txt
  253. +6 −8 docs/intro/whatsnext.txt
  254. +0 −2  docs/misc/api-stability.txt
  255. +1 −1  docs/misc/distributions.txt
  256. +8 −0 docs/ref/class-based-views/generic-date-based.txt
  257. +8 −4 docs/ref/class-based-views/mixins-date-based.txt
  258. BIN  docs/ref/contrib/admin/_images/raw_id_fields.png
  259. +59 −23 docs/ref/contrib/admin/index.txt
  260. +0 −21 docs/ref/contrib/comments/example.txt
  261. +50 −0 docs/ref/contrib/comments/index.txt
  262. +0 −4 docs/ref/contrib/comments/moderation.txt
  263. +0 −2  docs/ref/contrib/contenttypes.txt
  264. +3 −3 docs/ref/contrib/csrf.txt
  265. +1 −5 docs/ref/contrib/flatpages.txt
  266. +1 −1  docs/ref/contrib/formtools/form-wizard.txt
  267. +1 −1  docs/ref/contrib/gis/admin.txt
  268. +1 −1  docs/ref/contrib/gis/db-api.txt
  269. +4 −4 docs/ref/contrib/gis/geoip.txt
  270. +1 −1  docs/ref/contrib/gis/geoquerysets.txt
  271. +44 −10 docs/ref/contrib/gis/geos.txt
  272. +1 −1  docs/ref/contrib/gis/index.txt
  273. +0 −1,267 docs/ref/contrib/gis/install.txt
  274. 0  docs/ref/contrib/gis/{ → install}/create_template_postgis-1.3.sh
  275. 0  docs/ref/contrib/gis/{ → install}/create_template_postgis-1.4.sh
  276. 0  docs/ref/contrib/gis/{ → install}/create_template_postgis-1.5.sh
  277. 0  docs/ref/contrib/gis/{ → install}/create_template_postgis-debian.sh
  278. 0  docs/ref/contrib/gis/{ → install}/geodjango_setup.bat
  279. +282 −0 docs/ref/contrib/gis/install/geolibs.txt
  280. +535 −0 docs/ref/contrib/gis/install/index.txt
  281. +175 −0 docs/ref/contrib/gis/install/postgis.txt
  282. +222 −0 docs/ref/contrib/gis/install/spatialite.txt
  283. +0 −2  docs/ref/contrib/gis/testing.txt
  284. +108 −1,368 docs/ref/contrib/localflavor.txt
  285. +0 −2  docs/ref/contrib/sitemaps.txt
  286. +21 −38 docs/ref/contrib/sites.txt
  287. +0 −2  docs/ref/contrib/staticfiles.txt
  288. +2 −2 docs/ref/contrib/syndication.txt
  289. +10 −0 docs/ref/databases.txt
  290. +10 −25 docs/ref/django-admin.txt
  291. +3 −9 docs/ref/files/storage.txt
  292. +5 −7 docs/ref/forms/api.txt
  293. +12 −6 docs/ref/forms/fields.txt
  294. +2 −2 docs/ref/forms/validation.txt
  295. +0 −7 docs/ref/forms/widgets.txt
  296. +3 −1 docs/ref/index.txt
  297. +5 −5 docs/ref/middleware.txt
  298. +14 −2 docs/ref/models/fields.txt
  299. +14 −7 docs/ref/models/instances.txt
  300. +33 −15 docs/ref/models/querysets.txt
Sorry, we could not display the entire diff because too many files (523) changed.
View
4 .gitignore
@@ -1,4 +1,8 @@
*.egg-info
*.pot
*.py[co]
+MANIFEST
+dist/
docs/_build/
+tests/coverage_html/
+tests/.coverage
View
2  .hgignore
@@ -4,3 +4,5 @@ syntax:glob
*.pot
*.py[co]
docs/_build/
+tests/coverage_html/
+tests/.coverage
View
2  .tx/config
@@ -1,5 +1,5 @@
[main]
-host = https://www.transifex.net
+host = https://www.transifex.com
lang_map = sr@latin:sr_Latn
[django.core]
View
3  AUTHORS
@@ -33,6 +33,7 @@ The PRIMARY AUTHORS are (and/or have been):
* Florian Apolloner
* Jeremy Dunck
* Bryan Veloso
+ * Preston Holmes
More information on the main contributors to Django can be found in
docs/internals/committers.txt.
@@ -424,6 +425,7 @@ answer newbie questions, and generally made Django that much better:
phil@produxion.net
phil.h.smith@gmail.com
Gustavo Picon
+ Travis Pinney
Michael Placentra II <someone@michaelplacentra2.net>
plisk
Daniel Poelzleithner <http://poelzi.org/>
@@ -499,6 +501,7 @@ answer newbie questions, and generally made Django that much better:
Wiliam Alves de Souza <wiliamsouza83@gmail.com>
Don Spaulding <donspauldingii@gmail.com>
Calvin Spealman <ironfroggy@gmail.com>
+ Dane Springmeyer
Bjørn Stabell <bjorn@exoweb.net>
Georgi Stanojevski <glisha@gmail.com>
starrynight <cmorgh@gmail.com>
View
16 CONTRIBUTING.rst
@@ -0,0 +1,16 @@
+======================
+Contributing to Django
+======================
+
+As an open source project, Django welcomes contributions of many forms.
+
+Examples of contributions include:
+
+* Code patches
+* Documentation improvements
+* Bug reports and patch reviews
+
+Extensive contribution guidelines are available in the repository at
+``docs/internals/contributing/``, or online at:
+
+https://docs.djangoproject.com/en/dev/internals/contributing/
View
2  MANIFEST.in
@@ -32,3 +32,5 @@ recursive-include django/contrib/gis/tests/geogapp/fixtures *
recursive-include django/contrib/gis/tests/relatedapp/fixtures *
recursive-include django/contrib/sitemaps/templates *
recursive-include django/contrib/sitemaps/tests/templates *
+recursive-exclude * __pycache__
+recursive-exclude * *.py[co]
View
41 django/conf/__init__.py
@@ -25,7 +25,7 @@ class LazySettings(LazyObject):
The user can manually configure settings prior to using them. Otherwise,
Django uses the settings module pointed to by DJANGO_SETTINGS_MODULE.
"""
- def _setup(self, name):
+ def _setup(self, name=None):
"""
Load the settings module pointed to by the environment variable. This
is used the first time we need any settings at all, if the user has not
@@ -36,20 +36,40 @@ def _setup(self, name):
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"
raise ImproperlyConfigured(
- "Requested setting %s, but settings are not configured. "
+ "Requested %s, but settings are not configured. "
"You must either define the environment variable %s "
"or call settings.configure() before accessing settings."
- % (name, ENVIRONMENT_VARIABLE))
+ % (desc, ENVIRONMENT_VARIABLE))
self._wrapped = Settings(settings_module)
-
+ self._configure_logging()
def __getattr__(self, name):
if self._wrapped is empty:
self._setup(name)
return getattr(self._wrapped, name)
+ def _configure_logging(self):
+ """
+ Setup logging from LOGGING_CONFIG and LOGGING settings.
+ """
+ if self.LOGGING_CONFIG:
+ from django.utils.log import DEFAULT_LOGGING
+ # First find the logging configuration function ...
+ logging_config_path, logging_config_func_name = self.LOGGING_CONFIG.rsplit('.', 1)
+ logging_config_module = importlib.import_module(logging_config_path)
+ logging_config_func = getattr(logging_config_module, logging_config_func_name)
+
+ logging_config_func(DEFAULT_LOGGING)
+
+ if self.LOGGING:
+ # Backwards-compatibility shim for #16288 fix
+ compat_patch_logging_config(self.LOGGING)
+
+ # ... then invoke it with the logging settings
+ logging_config_func(self.LOGGING)
def configure(self, default_settings=global_settings, **options):
"""
@@ -133,19 +153,6 @@ def __init__(self, settings_module):
os.environ['TZ'] = self.TIME_ZONE
time.tzset()
- # Settings are configured, so we can set up the logger if required
- if self.LOGGING_CONFIG:
- # First find the logging configuration function ...
- logging_config_path, logging_config_func_name = self.LOGGING_CONFIG.rsplit('.', 1)
- logging_config_module = importlib.import_module(logging_config_path)
- logging_config_func = getattr(logging_config_module, logging_config_func_name)
-
- # Backwards-compatibility shim for #16288 fix
- compat_patch_logging_config(self.LOGGING)
-
- # ... then invoke it with the logging settings
- logging_config_func(self.LOGGING)
-
class UserSettingsHolder(BaseSettings):
"""
View
33 django/conf/global_settings.py
@@ -144,7 +144,7 @@
# Encoding of files read from disk (template and initial SQL files).
FILE_CHARSET = 'utf-8'
-# E-mail address that error messages come from.
+# Email address that error messages come from.
SERVER_EMAIL = 'root@localhost'
# Whether to send broken-link emails.
@@ -488,6 +488,8 @@
# AUTHENTICATION #
##################
+AUTH_USER_MODEL = 'auth.User'
+
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend',)
LOGIN_URL = '/accounts/login/'
@@ -549,33 +551,8 @@
# The callable to use to configure logging
LOGGING_CONFIG = 'django.utils.log.dictConfig'
-# The default logging configuration. This sends an email to
-# the site admins on every HTTP 500 error. All other log
-# records are sent to the bit bucket.
-
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'filters': {
- 'require_debug_false': {
- '()': 'django.utils.log.RequireDebugFalse',
- }
- },
- 'handlers': {
- 'mail_admins': {
- 'level': 'ERROR',
- 'filters': ['require_debug_false'],
- 'class': 'django.utils.log.AdminEmailHandler'
- }
- },
- 'loggers': {
- 'django.request': {
- 'handlers': ['mail_admins'],
- 'level': 'ERROR',
- 'propagate': True,
- },
- }
-}
+# Custom logging configuration.
+LOGGING = {}
# Default exception reporter filter class used in case none has been
# specifically assigned to the HttpRequest instance.
View
0  ...egressiontests/localflavor/za/__init__.py → django/conf/locale/de_CH/__init__.py
File renamed without changes
View
2  django/contrib/localflavor/de_CH/formats.py → django/conf/locale/de_CH/formats.py
@@ -35,7 +35,7 @@
'%Y-%m-%d', # '2006-10-25'
)
-# these are the separators for non-monetary numbers. For monetary numbers,
+# these are the separators for non-monetary numbers. For monetary numbers,
# the DECIMAL_SEPARATOR is a . (decimal point) and the THOUSAND_SEPARATOR is a
# ' (single quote).
# For details, please refer to http://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de
View
292 django/conf/locale/en/LC_MESSAGES/django.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Django\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-03-23 02:29+0100\n"
+"POT-Creation-Date: 2012-10-15 10:55+0200\n"
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
"Last-Translator: Django team\n"
"Language-Team: English <en@li.org>\n"
@@ -297,385 +297,386 @@ msgstr ""
msgid "Traditional Chinese"
msgstr ""
-#: core/validators.py:24 forms/fields.py:51
+#: core/validators.py:21 forms/fields.py:52
msgid "Enter a valid value."
msgstr ""
-#: core/validators.py:99 forms/fields.py:601
-msgid "This URL appears to be a broken link."
+#: core/validators.py:104 forms/fields.py:464
+msgid "Enter a valid email address."
msgstr ""
-#: core/validators.py:131 forms/fields.py:600
-msgid "Enter a valid URL."
-msgstr ""
-
-#: core/validators.py:165 forms/fields.py:474
-msgid "Enter a valid e-mail address."
-msgstr ""
-
-#: core/validators.py:168 forms/fields.py:1023
+#: core/validators.py:107 forms/fields.py:1013
msgid ""
"Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens."
msgstr ""
-#: core/validators.py:171 core/validators.py:188 forms/fields.py:997
+#: core/validators.py:110 core/validators.py:129 forms/fields.py:987
msgid "Enter a valid IPv4 address."
msgstr ""
-#: core/validators.py:175 core/validators.py:189
+#: core/validators.py:115 core/validators.py:130
msgid "Enter a valid IPv6 address."
msgstr ""
-#: core/validators.py:184 core/validators.py:187
+#: core/validators.py:125 core/validators.py:128
msgid "Enter a valid IPv4 or IPv6 address."
msgstr ""
-#: core/validators.py:209 db/models/fields/__init__.py:638
+#: core/validators.py:151 db/models/fields/__init__.py:655
msgid "Enter only digits separated by commas."
msgstr ""
-#: core/validators.py:215
+#: core/validators.py:157
#, python-format
msgid "Ensure this value is %(limit_value)s (it is %(show_value)s)."
msgstr ""
-#: core/validators.py:233 forms/fields.py:209 forms/fields.py:262
+#: core/validators.py:176 forms/fields.py:210 forms/fields.py:263
#, python-format
msgid "Ensure this value is less than or equal to %(limit_value)s."
msgstr ""
-#: core/validators.py:238 forms/fields.py:210 forms/fields.py:263
+#: core/validators.py:182 forms/fields.py:211 forms/fields.py:264
#, python-format
msgid "Ensure this value is greater than or equal to %(limit_value)s."
msgstr ""
-#: core/validators.py:244
+#: core/validators.py:189
#, python-format
msgid ""
"Ensure this value has at least %(limit_value)d characters (it has "
"%(show_value)d)."
msgstr ""
-#: core/validators.py:250
+#: core/validators.py:196
#, python-format
msgid ""
"Ensure this value has at most %(limit_value)d characters (it has "
"%(show_value)d)."
msgstr ""
-#: db/models/base.py:764
+#: db/models/base.py:843
#, python-format
msgid "%(field_name)s must be unique for %(date_field)s %(lookup)s."
msgstr ""
-#: db/models/base.py:787 forms/models.py:577
+#: db/models/base.py:866 forms/models.py:573
msgid "and"
msgstr ""
-#: db/models/base.py:788 db/models/fields/__init__.py:65
+#: db/models/base.py:867 db/models/fields/__init__.py:70
#, python-format
msgid "%(model_name)s with this %(field_label)s already exists."
msgstr ""
-#: db/models/fields/__init__.py:62
+#: db/models/fields/__init__.py:67
#, python-format
msgid "Value %r is not a valid choice."
msgstr ""
-#: db/models/fields/__init__.py:63
+#: db/models/fields/__init__.py:68
msgid "This field cannot be null."
msgstr ""
-#: db/models/fields/__init__.py:64
+#: db/models/fields/__init__.py:69
msgid "This field cannot be blank."
msgstr ""
-#: db/models/fields/__init__.py:71
+#: db/models/fields/__init__.py:76
#, python-format
msgid "Field of type: %(field_type)s"
msgstr ""
-#: db/models/fields/__init__.py:506 db/models/fields/__init__.py:961
+#: db/models/fields/__init__.py:517 db/models/fields/__init__.py:985
msgid "Integer"
msgstr ""
-#: db/models/fields/__init__.py:510 db/models/fields/__init__.py:959
+#: db/models/fields/__init__.py:521 db/models/fields/__init__.py:983
#, python-format
msgid "'%s' value must be an integer."
msgstr ""
-#: db/models/fields/__init__.py:552
+#: db/models/fields/__init__.py:569
#, python-format
msgid "'%s' value must be either True or False."
msgstr ""
-#: db/models/fields/__init__.py:554
+#: db/models/fields/__init__.py:571
msgid "Boolean (Either True or False)"
msgstr ""
-#: db/models/fields/__init__.py:605
+#: db/models/fields/__init__.py:622
#, python-format
msgid "String (up to %(max_length)s)"
msgstr ""
-#: db/models/fields/__init__.py:633
+#: db/models/fields/__init__.py:650
msgid "Comma-separated integers"
msgstr ""
-#: db/models/fields/__init__.py:647
+#: db/models/fields/__init__.py:664
#, python-format
msgid "'%s' value has an invalid date format. It must be in YYYY-MM-DD format."
msgstr ""
-#: db/models/fields/__init__.py:649 db/models/fields/__init__.py:734
+#: db/models/fields/__init__.py:666 db/models/fields/__init__.py:754
#, python-format
msgid ""
"'%s' value has the correct format (YYYY-MM-DD) but it is an invalid date."
msgstr ""
-#: db/models/fields/__init__.py:652
+#: db/models/fields/__init__.py:669
msgid "Date (without time)"
msgstr ""
-#: db/models/fields/__init__.py:732
+#: db/models/fields/__init__.py:752
#, python-format
msgid ""
"'%s' value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[."
"uuuuuu]][TZ] format."
msgstr ""
-#: db/models/fields/__init__.py:736
+#: db/models/fields/__init__.py:756
#, python-format
msgid ""
"'%s' value has the correct format (YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ]) but "
"it is an invalid date/time."
msgstr ""
-#: db/models/fields/__init__.py:740
+#: db/models/fields/__init__.py:760
msgid "Date (with time)"
msgstr ""
-#: db/models/fields/__init__.py:831
+#: db/models/fields/__init__.py:849
#, python-format
msgid "'%s' value must be a decimal number."
msgstr ""
-#: db/models/fields/__init__.py:833
+#: db/models/fields/__init__.py:851
msgid "Decimal number"
msgstr ""
-#: db/models/fields/__init__.py:890
-msgid "E-mail address"
+#: db/models/fields/__init__.py:908
+msgid "Email address"
msgstr ""
-#: db/models/fields/__init__.py:906
+#: db/models/fields/__init__.py:927
msgid "File path"
msgstr ""
-#: db/models/fields/__init__.py:930
+#: db/models/fields/__init__.py:954
#, python-format
msgid "'%s' value must be a float."
msgstr ""
-#: db/models/fields/__init__.py:932
+#: db/models/fields/__init__.py:956
msgid "Floating point number"
msgstr ""
-#: db/models/fields/__init__.py:993
+#: db/models/fields/__init__.py:1017
msgid "Big (8 byte) integer"
msgstr ""
-#: db/models/fields/__init__.py:1007
+#: db/models/fields/__init__.py:1031
msgid "IPv4 address"
msgstr ""
-#: db/models/fields/__init__.py:1023
+#: db/models/fields/__init__.py:1047
msgid "IP address"
msgstr ""
-#: db/models/fields/__init__.py:1065
+#: db/models/fields/__init__.py:1090
#, python-format
msgid "'%s' value must be either None, True or False."
msgstr ""
-#: db/models/fields/__init__.py:1067
+#: db/models/fields/__init__.py:1092
msgid "Boolean (Either True, False or None)"
msgstr ""
-#: db/models/fields/__init__.py:1116
+#: db/models/fields/__init__.py:1141
msgid "Positive integer"
msgstr ""
-#: db/models/fields/__init__.py:1127
+#: db/models/fields/__init__.py:1152
msgid "Positive small integer"
msgstr ""
-#: db/models/fields/__init__.py:1138
+#: db/models/fields/__init__.py:1163
#, python-format
msgid "Slug (up to %(max_length)s)"
msgstr ""
-#: db/models/fields/__init__.py:1156
+#: db/models/fields/__init__.py:1181
msgid "Small integer"
msgstr ""
-#: db/models/fields/__init__.py:1162
+#: db/models/fields/__init__.py:1187
msgid "Text"
msgstr ""
-#: db/models/fields/__init__.py:1180
+#: db/models/fields/__init__.py:1205
#, python-format
msgid ""
"'%s' value has an invalid format. It must be in HH:MM[:ss[.uuuuuu]] format."
msgstr ""
-#: db/models/fields/__init__.py:1182
+#: db/models/fields/__init__.py:1207
#, python-format
msgid ""
"'%s' value has the correct format (HH:MM[:ss[.uuuuuu]]) but it is an invalid "
"time."
msgstr ""
-#: db/models/fields/__init__.py:1185
+#: db/models/fields/__init__.py:1210
msgid "Time"
msgstr ""
-#: db/models/fields/__init__.py:1249
+#: db/models/fields/__init__.py:1272
msgid "URL"
msgstr ""
-#: db/models/fields/files.py:214
+#: db/models/fields/files.py:211
+#, python-format
+msgid "Filename is %(extra)d characters too long."
+msgstr ""
+
+#: db/models/fields/files.py:221
msgid "File"
msgstr ""
-#: db/models/fields/files.py:321
+#: db/models/fields/files.py:347
msgid "Image"
msgstr ""
-#: db/models/fields/related.py:903
+#: db/models/fields/related.py:950
#, python-format
msgid "Model %(model)s with pk %(pk)r does not exist."
msgstr ""
-#: db/models/fields/related.py:905
+#: db/models/fields/related.py:952
msgid "Foreign Key (type determined by related field)"
msgstr ""
-#: db/models/fields/related.py:1033
+#: db/models/fields/related.py:1082
msgid "One-to-one relationship"
msgstr ""
-#: db/models/fields/related.py:1096
+#: db/models/fields/related.py:1149
msgid "Many-to-many relationship"
msgstr ""
-#: db/models/fields/related.py:1120
+#: db/models/fields/related.py:1174
msgid ""
"Hold down \"Control\", or \"Command\" on a Mac, to select more than one."
msgstr ""
-#: forms/fields.py:50
+#: forms/fields.py:51
msgid "This field is required."
msgstr ""
-#: forms/fields.py:208
+#: forms/fields.py:209
msgid "Enter a whole number."
msgstr ""
-#: forms/fields.py:240 forms/fields.py:261
+#: forms/fields.py:241 forms/fields.py:262
msgid "Enter a number."
msgstr ""
-#: forms/fields.py:264
+#: forms/fields.py:265
#, python-format
msgid "Ensure that there are no more than %s digits in total."
msgstr ""
-#: forms/fields.py:265
+#: forms/fields.py:266
#, python-format
msgid "Ensure that there are no more than %s decimal places."
msgstr ""
-#: forms/fields.py:266
+#: forms/fields.py:267
#, python-format
msgid "Ensure that there are no more than %s digits before the decimal point."
msgstr ""
-#: forms/fields.py:365 forms/fields.py:963
+#: forms/fields.py:355 forms/fields.py:953
msgid "Enter a valid date."
msgstr ""
-#: forms/fields.py:388 forms/fields.py:964
+#: forms/fields.py:378 forms/fields.py:954
msgid "Enter a valid time."
msgstr ""
-#: forms/fields.py:409
+#: forms/fields.py:399
msgid "Enter a valid date/time."
msgstr ""
-#: forms/fields.py:485
+#: forms/fields.py:475
msgid "No file was submitted. Check the encoding type on the form."
msgstr ""
-#: forms/fields.py:486
+#: forms/fields.py:476
msgid "No file was submitted."
msgstr ""
-#: forms/fields.py:487
+#: forms/fields.py:477
msgid "The submitted file is empty."
msgstr ""
-#: forms/fields.py:488
+#: forms/fields.py:478
#, python-format
msgid ""
"Ensure this filename has at most %(max)d characters (it has %(length)d)."
msgstr ""
-#: forms/fields.py:489
+#: forms/fields.py:479
msgid "Please either submit a file or check the clear checkbox, not both."
msgstr ""
-#: forms/fields.py:544
+#: forms/fields.py:534
msgid ""
"Upload a valid image. The file you uploaded was either not an image or a "
"corrupted image."
msgstr ""
-#: forms/fields.py:689 forms/fields.py:769
+#: forms/fields.py:580
+msgid "Enter a valid URL."
+msgstr ""
+
+#: forms/fields.py:666 forms/fields.py:746
#, python-format
msgid "Select a valid choice. %(value)s is not one of the available choices."
msgstr ""
-#: forms/fields.py:770 forms/fields.py:858 forms/models.py:999
+#: forms/fields.py:747 forms/fields.py:835 forms/models.py:999
msgid "Enter a list of values."
msgstr ""
-#: forms/formsets.py:317 forms/formsets.py:319
+#: forms/formsets.py:323 forms/formsets.py:325
msgid "Order"
msgstr ""
-#: forms/formsets.py:321
+#: forms/formsets.py:327
msgid "Delete"
msgstr ""
-#: forms/models.py:571
+#: forms/models.py:567
#, python-format
msgid "Please correct the duplicate data for %(field)s."
msgstr ""
-#: forms/models.py:575
+#: forms/models.py:571
#, python-format
msgid "Please correct the duplicate data for %(field)s, which must be unique."
msgstr ""
-#: forms/models.py:581
+#: forms/models.py:577
#, python-format
msgid ""
"Please correct the duplicate data for %(field_name)s which must be unique "
"for the %(lookup)s in %(date_field)s."
msgstr ""
-#: forms/models.py:589
+#: forms/models.py:585
msgid "Please correct the duplicate values below."
msgstr ""
@@ -697,94 +698,94 @@ msgstr ""
msgid "\"%s\" is not a valid value for a primary key."
msgstr ""
-#: forms/util.py:70
+#: forms/util.py:81
#, python-format
msgid ""
"%(datetime)s couldn't be interpreted in time zone %(current_timezone)s; it "
"may be ambiguous or it may not exist."
msgstr ""
-#: forms/widgets.py:325
+#: forms/widgets.py:336
msgid "Currently"
msgstr ""
-#: forms/widgets.py:326
+#: forms/widgets.py:337
msgid "Change"
msgstr ""
-#: forms/widgets.py:327
+#: forms/widgets.py:338
msgid "Clear"
msgstr ""
-#: forms/widgets.py:582
+#: forms/widgets.py:591
msgid "Unknown"
msgstr ""
-#: forms/widgets.py:583
+#: forms/widgets.py:592
msgid "Yes"
msgstr ""
-#: forms/widgets.py:584
+#: forms/widgets.py:593
msgid "No"
msgstr ""
-#: template/defaultfilters.py:797
+#: template/defaultfilters.py:794
msgid "yes,no,maybe"
msgstr ""
-#: template/defaultfilters.py:825 template/defaultfilters.py:830
+#: template/defaultfilters.py:822 template/defaultfilters.py:833
#, python-format
msgid "%(size)d byte"
msgid_plural "%(size)d bytes"
msgstr[0] ""
msgstr[1] ""
-#: template/defaultfilters.py:832
+#: template/defaultfilters.py:835
#, python-format
msgid "%s KB"
msgstr ""
-#: template/defaultfilters.py:834
+#: template/defaultfilters.py:837
#, python-format
msgid "%s MB"
msgstr ""
-#: template/defaultfilters.py:836
+#: template/defaultfilters.py:839
#, python-format
msgid "%s GB"
msgstr ""
-#: template/defaultfilters.py:838
+#: template/defaultfilters.py:841
#, python-format
msgid "%s TB"
msgstr ""
-#: template/defaultfilters.py:839
+#: template/defaultfilters.py:842
#, python-format
msgid "%s PB"
msgstr ""
-#: utils/dateformat.py:45
+#: utils/dateformat.py:47
msgid "p.m."
msgstr ""
-#: utils/dateformat.py:46
+#: utils/dateformat.py:48
msgid "a.m."
msgstr ""
-#: utils/dateformat.py:51
+#: utils/dateformat.py:53
msgid "PM"
msgstr ""
-#: utils/dateformat.py:52
+#: utils/dateformat.py:54
msgid "AM"
msgstr ""
-#: utils/dateformat.py:101
+#: utils/dateformat.py:103
msgid "midnight"
msgstr ""
-#: utils/dateformat.py:103
+#: utils/dateformat.py:105
msgid "noon"
msgstr ""
@@ -1060,148 +1061,133 @@ msgctxt "alt. month"
msgid "December"
msgstr ""
-#: utils/text.py:65
+#: utils/text.py:70
#, python-format
msgctxt "String to return when truncating text"
msgid "%(truncated_text)s..."
msgstr ""
-#: utils/text.py:234
+#: utils/text.py:239
msgid "or"
msgstr ""
#. Translators: This string is used as a separator between list elements
-#: utils/text.py:251
+#: utils/text.py:256
msgid ", "
msgstr ""
-#: utils/timesince.py:20
+#: utils/timesince.py:22
msgid "year"
msgid_plural "years"
msgstr[0] ""
msgstr[1] ""
-#: utils/timesince.py:21
+#: utils/timesince.py:23
msgid "month"
msgid_plural "months"
msgstr[0] ""
msgstr[1] ""
-#: utils/timesince.py:22
+#: utils/timesince.py:24
msgid "week"
msgid_plural "weeks"
msgstr[0] ""
msgstr[1] ""
-#: utils/timesince.py:23
+#: utils/timesince.py:25
msgid "day"
msgid_plural "days"
msgstr[0] ""
msgstr[1] ""
-#: utils/timesince.py:24
+#: utils/timesince.py:26
msgid "hour"
msgid_plural "hours"
msgstr[0] ""
msgstr[1] ""
-#: utils/timesince.py:25
+#: utils/timesince.py:27
msgid "minute"
msgid_plural "minutes"
msgstr[0] ""
msgstr[1] ""
-#: utils/timesince.py:41
+#: utils/timesince.py:43
msgid "minutes"
msgstr ""
-#: utils/timesince.py:46
+#: utils/timesince.py:48
#, python-format
msgid "%(number)d %(type)s"
msgstr ""
-#: utils/timesince.py:52
+#: utils/timesince.py:54
#, python-format
msgid ", %(number)d %(type)s"
msgstr ""
-#: views/static.py:52
+#: views/static.py:55
msgid "Directory indexes are not allowed here."
msgstr ""
-#: views/static.py:54
+#: views/static.py:57
#, python-format
msgid "\"%(path)s\" does not exist"
msgstr ""
-#: views/static.py:95
+#: views/static.py:98
#, python-format
msgid "Index of %(directory)s"
msgstr ""
-#: views/generic/create_update.py:121
-#, python-format
-msgid "The %(verbose_name)s was created successfully."
-msgstr ""
-
-#: views/generic/create_update.py:164
-#, python-format
-msgid "The %(verbose_name)s was updated successfully."
-msgstr ""
-
-#: views/generic/create_update.py:207
-#, python-format
-msgid "The %(verbose_name)s was deleted."
-msgstr ""
-
-#: views/generic/dates.py:33
+#: views/generic/dates.py:42
msgid "No year specified"
msgstr ""
-#: views/generic/dates.py:58
+#: views/generic/dates.py:98
msgid "No month specified"
msgstr ""
-#: views/generic/dates.py:99
+#: views/generic/dates.py:157
msgid "No day specified"
msgstr ""
-#: views/generic/dates.py:138
+#: views/generic/dates.py:213
msgid "No week specified"
msgstr ""
-#: views/generic/dates.py:198 views/generic/dates.py:215
+#: views/generic/dates.py:368 views/generic/dates.py:393
#, python-format
msgid "No %(verbose_name_plural)s available"
msgstr ""
-#: views/generic/dates.py:467
+#: views/generic/dates.py:646
#, python-format
msgid ""
"Future %(verbose_name_plural)s not available because %(class_name)s."
"allow_future is False."
msgstr ""
-#: views/generic/dates.py:501
+#: views/generic/dates.py:678
#, python-format
msgid "Invalid date string '%(datestr)s' given format '%(format)s'"
msgstr ""
-#: views/generic/detail.py:51
+#: views/generic/detail.py:54
#, python-format
msgid "No %(verbose_name)s found matching the query"
msgstr ""
-#: views/generic/list.py:45
+#: views/generic/list.py:49
msgid "Page is not 'last', nor can it be converted to an int."
msgstr ""
-#: views/generic/list.py:50
+#: views/generic/list.py:54
#, python-format
msgid "Invalid page (%(page_number)s)"
msgstr ""
-#: views/generic/list.py:117
+#: views/generic/list.py:134
#, python-format
msgid "Empty list and '%(class_name)s.allow_empty' is False."
msgstr ""
View
4 django/conf/project_template/project_name/wsgi.py
@@ -15,6 +15,10 @@
"""
import os
+# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
+# if running multiple sites in the same mod_wsgi process. To fix this, use
+# mod_wsgi daemon mode with each site in its own daemon process, or use
+# os.environ["DJANGO_SETTINGS_MODULE"] = "{{ project_name }}.settings"
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
# This application object is used by any WSGI server configured to use this
View
15 django/contrib/admin/forms.py
@@ -4,12 +4,12 @@
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 _
+from django.utils.translation import ugettext_lazy
ERROR_MESSAGE = ugettext_lazy("Please enter the correct username and password "
"for a staff account. Note that both fields are case-sensitive.")
+
class AdminAuthenticationForm(AuthenticationForm):
"""
A custom authentication form used in the admin app.
@@ -26,17 +26,6 @@ def clean(self):
if username and password:
self.user_cache = authenticate(username=username, password=password)
if self.user_cache is None:
- if '@' in username:
- # Mistakenly entered e-mail address instead of username? Look it up.
- try:
- user = User.objects.get(email=username)
- except (User.DoesNotExist, User.MultipleObjectsReturned):
- # Nothing to do here, moving along.
- pass
- else:
- if user.check_password(password):
- message = _("Your e-mail address is not your username."
- " Try '%s' instead.") % user.username
raise forms.ValidationError(message)
elif not self.user_cache.is_active or not self.user_cache.is_staff:
raise forms.ValidationError(message)
View
345 django/contrib/admin/locale/en/LC_MESSAGES/django.po
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Django\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-03-23 02:34+0100\n"
+"POT-Creation-Date: 2012-10-15 10:56+0200\n"
"PO-Revision-Date: 2010-05-13 15:35+0200\n"
"Last-Translator: Django team\n"
"Language-Team: English <en@li.org>\n"
@@ -32,39 +32,39 @@ msgstr ""
msgid "Delete selected %(verbose_name_plural)s"
msgstr ""
-#: filters.py:101 filters.py:191 filters.py:231 filters.py:268 filters.py:378
+#: filters.py:101 filters.py:197 filters.py:237 filters.py:274 filters.py:380
msgid "All"
msgstr ""
-#: filters.py:232
+#: filters.py:238
msgid "Yes"
msgstr ""
-#: filters.py:233
+#: filters.py:239
msgid "No"
msgstr ""
-#: filters.py:247
+#: filters.py:253
msgid "Unknown"
msgstr ""
-#: filters.py:306
+#: filters.py:308
msgid "Any date"
msgstr ""
-#: filters.py:307
+#: filters.py:309
msgid "Today"
msgstr ""
-#: filters.py:311
+#: filters.py:313
msgid "Past 7 days"
msgstr ""
-#: filters.py:315
+#: filters.py:317
msgid "This month"
msgstr ""
-#: filters.py:319
+#: filters.py:321
msgid "This year"
msgstr ""
@@ -74,134 +74,129 @@ msgid ""
"that both fields are case-sensitive."
msgstr ""
-#: forms.py:18
+#: forms.py:19
msgid "Please log in again, because your session has expired."
msgstr ""
-#: forms.py:37
-#, python-format
-msgid "Your e-mail address is not your username. Try '%s' instead."
-msgstr ""
-
-#: helpers.py:20
+#: helpers.py:23
msgid "Action:"
msgstr ""
-#: models.py:19
+#: models.py:24
msgid "action time"
msgstr ""
-#: models.py:22
+#: models.py:27
msgid "object id"
msgstr ""
-#: models.py:23
+#: models.py:28
msgid "object repr"
msgstr ""
-#: models.py:24
+#: models.py:29
msgid "action flag"
msgstr ""
-#: models.py:25
+#: models.py:30
msgid "change message"
msgstr ""
-#: models.py:30
+#: models.py:35
msgid "log entry"
msgstr ""
-#: models.py:31
+#: models.py:36
msgid "log entries"
msgstr ""
-#: models.py:40
+#: models.py:45
#, python-format
msgid "Added \"%(object)s\"."
msgstr ""
-#: models.py:42
+#: models.py:47
#, python-format
msgid "Changed \"%(object)s\" - %(changes)s"
msgstr ""
-#: models.py:44
+#: models.py:49
#, python-format
msgid "Deleted \"%(object)s.\""
msgstr ""
-#: models.py:46
+#: models.py:51
msgid "LogEntry Object"
msgstr ""
-#: options.py:150 options.py:166
+#: options.py:151 options.py:167
msgid "None"
msgstr ""
-#: options.py:671
+#: options.py:672
#, python-format
msgid "Changed %s."
msgstr ""
-#: options.py:671 options.py:681
+#: options.py:672 options.py:682
msgid "and"
msgstr ""
-#: options.py:676
+#: options.py:677
#, python-format
msgid "Added %(name)s \"%(object)s\"."
msgstr ""
-#: options.py:680
+#: options.py:681
#, python-format
msgid "Changed %(list)s for %(name)s \"%(object)s\"."
msgstr ""
-#: options.py:685
+#: options.py:686
#, python-format
msgid "Deleted %(name)s \"%(object)s\"."
msgstr ""
-#: options.py:689
+#: options.py:690
msgid "No fields changed."
msgstr ""
-#: options.py:772
+#: options.py:773
#, python-format
msgid "The %(name)s \"%(obj)s\" was added successfully."
msgstr ""
-#: options.py:776 options.py:824
+#: options.py:777 options.py:825
msgid "You may edit it again below."
msgstr ""
-#: options.py:788 options.py:837
+#: options.py:789 options.py:838
#, python-format
msgid "You may add another %s below."
msgstr ""
-#: options.py:822
+#: options.py:823
#, python-format
msgid "The %(name)s \"%(obj)s\" was changed successfully."
msgstr ""
-#: options.py:830
+#: options.py:831
#, python-format
msgid ""
"The %(name)s \"%(obj)s\" was added successfully. You may edit it again below."
msgstr ""
-#: options.py:899 options.py:1159
+#: options.py:900 options.py:1159
msgid ""
"Items must be selected in order to perform actions on them. No items have "
"been changed."
msgstr ""
-#: options.py:918
+#: options.py:919
msgid "No action selected."
msgstr ""
-#: options.py:998
+#: options.py:999
#, python-format
msgid "Add %s"
msgstr ""
@@ -249,34 +244,34 @@ msgstr ""
msgid "Change history: %s"
msgstr ""
-#: sites.py:315 tests.py:61 templates/admin/login.html:49
-#: templates/registration/password_reset_complete.html:20
-#: views/decorators.py:23
+#: sites.py:322 tests.py:57 templates/admin/login.html:48
+#: templates/registration/password_reset_complete.html:19
+#: views/decorators.py:24
msgid "Log in"
msgstr ""
-#: sites.py:380
+#: sites.py:388
msgid "Site administration"
msgstr ""
-#: sites.py:432
+#: sites.py:440
#, python-format
msgid "%s administration"
msgstr ""
-#: widgets.py:87
+#: widgets.py:90
msgid "Date:"
msgstr ""
-#: widgets.py:87
+#: widgets.py:91
msgid "Time:"
msgstr ""
-#: widgets.py:161
+#: widgets.py:165
msgid "Lookup"
msgstr ""
-#: widgets.py:267
+#: widgets.py:271
msgid "Add Another"
msgstr ""
@@ -288,39 +283,39 @@ msgstr ""
msgid "We're sorry, but the requested page could not be found."
msgstr ""
-#: templates/admin/500.html:7 templates/admin/app_index.html:8
-#: templates/admin/base.html:45 templates/admin/change_form.html:21
-#: templates/admin/change_list.html:43
-#: templates/admin/delete_confirmation.html:8
-#: templates/admin/delete_selected_confirmation.html:8
-#: templates/admin/invalid_setup.html:7 templates/admin/object_history.html:8
-#: templates/admin/auth/user/change_password.html:15
-#: templates/registration/logged_out.html:5
-#: templates/registration/password_change_done.html:7
-#: templates/registration/password_change_form.html:8
-#: templates/registration/password_reset_complete.html:7
-#: templates/registration/password_reset_confirm.html:7
-#: templates/registration/password_reset_done.html:7
-#: templates/registration/password_reset_form.html:7
+#: templates/admin/500.html:6 templates/admin/app_index.html:7
+#: templates/admin/base.html:47 templates/admin/change_form.html:19
+#: templates/admin/change_list.html:41
+#: templates/admin/delete_confirmation.html:7
+#: templates/admin/delete_selected_confirmation.html:7
+#: templates/admin/invalid_setup.html:6 templates/admin/object_history.html:7
+#: templates/admin/auth/user/change_password.html:13
+#: templates/registration/logged_out.html:4
+#: templates/registration/password_change_done.html:6
+#: templates/registration/password_change_form.html:7
+#: templates/registration/password_reset_complete.html:6
+#: templates/registration/password_reset_confirm.html:6
+#: templates/registration/password_reset_done.html:6
+#: templates/registration/password_reset_form.html:6
msgid "Home"
msgstr ""
-#: templates/admin/500.html:8
+#: templates/admin/500.html:7
msgid "Server error"
msgstr ""
-#: templates/admin/500.html:12
+#: templates/admin/500.html:11
msgid "Server error (500)"
msgstr ""
-#: templates/admin/500.html:15
+#: templates/admin/500.html:14
msgid "Server Error <em>(500)</em>"
msgstr ""
-#: templates/admin/500.html:16
+#: templates/admin/500.html:15
msgid ""
-"There's been an error. It's been reported to the site administrators via e-"
-"mail and should be fixed shortly. Thanks for your patience."
+"There's been an error. It's been reported to the site administrators via "
+"email and should be fixed shortly. Thanks for your patience."
msgstr ""
#: templates/admin/actions.html:4
@@ -344,7 +339,7 @@ msgstr ""
msgid "Clear selection"
msgstr ""
-#: templates/admin/app_index.html:11 templates/admin/index.html:19
+#: templates/admin/app_index.html:10 templates/admin/index.html:21
#, python-format
msgid "%(name)s"
msgstr ""
@@ -354,22 +349,22 @@ msgid "Welcome,"
msgstr ""
#: templates/admin/base.html:33
-#: templates/registration/password_change_done.html:4
-#: templates/registration/password_change_form.html:5
+#: templates/registration/password_change_done.html:3
+#: templates/registration/password_change_form.html:4
msgid "Documentation"
msgstr ""
-#: templates/admin/base.html:35
-#: templates/admin/auth/user/change_password.html:19
-#: templates/admin/auth/user/change_password.html:53
-#: templates/registration/password_change_done.html:4
-#: templates/registration/password_change_form.html:5
+#: templates/admin/base.html:36
+#: templates/admin/auth/user/change_password.html:17
+#: templates/admin/auth/user/change_password.html:51
+#: templates/registration/password_change_done.html:3
+#: templates/registration/password_change_form.html:4
msgid "Change password"
msgstr ""
-#: templates/admin/base.html:36
-#: templates/registration/password_change_done.html:4
-#: templates/registration/password_change_form.html:5
+#: templates/admin/base.html:38
+#: templates/registration/password_change_done.html:3
+#: templates/registration/password_change_form.html:4
msgid "Log out"
msgstr ""
@@ -381,35 +376,35 @@ msgstr ""
msgid "Django administration"
msgstr ""
-#: templates/admin/change_form.html:24 templates/admin/index.html:29
+#: templates/admin/change_form.html:22 templates/admin/index.html:33
msgid "Add"
msgstr ""
-#: templates/admin/change_form.html:34 templates/admin/object_history.html:12
+#: templates/admin/change_form.html:32 templates/admin/object_history.html:11
msgid "History"
msgstr ""
-#: templates/admin/change_form.html:35
+#: templates/admin/change_form.html:33
#: templates/admin/edit_inline/stacked.html:9
#: templates/admin/edit_inline/tabular.html:30
msgid "View on site"
msgstr ""
-#: templates/admin/change_form.html:46 templates/admin/change_list.html:69
-#: templates/admin/login.html:18
-#: templates/admin/auth/user/change_password.html:29
-#: templates/registration/password_change_form.html:21
+#: templates/admin/change_form.html:44 templates/admin/change_list.html:67
+#: templates/admin/login.html:17
+#: templates/admin/auth/user/change_password.html:27
+#: templates/registration/password_change_form.html:20
msgid "Please correct the error below."
msgid_plural "Please correct the errors below."
msgstr[0] ""
msgstr[1] ""
-#: templates/admin/change_list.html:60
+#: templates/admin/change_list.html:58
#, python-format
msgid "Add %(name)s"
msgstr ""
-#: templates/admin/change_list.html:80
+#: templates/admin/change_list.html:78
msgid "Filter"
msgstr ""
@@ -426,12 +421,12 @@ msgstr ""
msgid "Toggle sorting"
msgstr ""
-#: templates/admin/delete_confirmation.html:12
+#: templates/admin/delete_confirmation.html:11
#: templates/admin/submit_line.html:4
msgid "Delete"
msgstr ""
-#: templates/admin/delete_confirmation.html:19
+#: templates/admin/delete_confirmation.html:18
#, python-format
msgid ""
"Deleting the %(object_name)s '%(escaped_object)s' would result in deleting "
@@ -439,30 +434,30 @@ msgid ""
"following types of objects:"
msgstr ""
-#: templates/admin/delete_confirmation.html:27
+#: templates/admin/delete_confirmation.html:26
#, python-format
msgid ""
"Deleting the %(object_name)s '%(escaped_object)s' would require deleting the "
"following protected related objects:"
msgstr ""
-#: templates/admin/delete_confirmation.html:35
+#: templates/admin/delete_confirmation.html:34
#, python-format
msgid ""
"Are you sure you want to delete the %(object_name)s \"%(escaped_object)s\"? "
"All of the following related items will be deleted:"
msgstr ""
-#: templates/admin/delete_confirmation.html:40
-#: templates/admin/delete_selected_confirmation.html:45
+#: templates/admin/delete_confirmation.html:39
+#: templates/admin/delete_selected_confirmation.html:44
msgid "Yes, I'm sure"
msgstr ""
-#: templates/admin/delete_selected_confirmation.html:11
+#: templates/admin/delete_selected_confirmation.html:10
msgid "Delete multiple objects"
msgstr ""
-#: templates/admin/delete_selected_confirmation.html:18
+#: templates/admin/delete_selected_confirmation.html:17
#, python-format
msgid ""
"Deleting the selected %(objects_name)s would result in deleting related "
@@ -470,14 +465,14 @@ msgid ""
"types of objects:"
msgstr ""
-#: templates/admin/delete_selected_confirmation.html:26
+#: templates/admin/delete_selected_confirmation.html:25
#, python-format
msgid ""
"Deleting the selected %(objects_name)s would require deleting the following "
"protected related objects:"
msgstr ""
-#: templates/admin/delete_selected_confirmation.html:34
+#: templates/admin/delete_selected_confirmation.html:33
#, python-format
msgid ""
"Are you sure you want to delete the selected %(objects_name)s? All of the "
@@ -489,67 +484,63 @@ msgstr ""
msgid " By %(filter_title)s "
msgstr ""
-#: templates/admin/index.html:18
+#: templates/admin/index.html:20
#, python-format
-msgid "Models available in the %(name)s application."
+msgid "Models in the %(name)s application"
msgstr ""
-#: templates/admin/index.html:35
+#: templates/admin/index.html:39
msgid "Change"
msgstr ""
-#: templates/admin/index.html:45
+#: templates/admin/index.html:49
msgid "You don't have permission to edit anything."
msgstr ""
-#: templates/admin/index.html:53
+#: templates/admin/index.html:57
msgid "Recent Actions"
msgstr ""
-#: templates/admin/index.html:54
+#: templates/admin/index.html:58
msgid "My Actions"
msgstr ""
-#: templates/admin/index.html:58
+#: templates/admin/index.html:62
msgid "None available"
msgstr ""
-#: templates/admin/index.html:72
+#: templates/admin/index.html:76
msgid "Unknown content"
msgstr ""
-#: templates/admin/invalid_setup.html:13
+#: templates/admin/invalid_setup.html:12
msgid ""
"Something's wrong with your database installation. Make sure the appropriate "
"database tables have been created, and make sure the database is readable by "
"the appropriate user."
msgstr ""
-#: templates/admin/login.html:34
-msgid "Username:"
-msgstr ""
-
-#: templates/admin/login.html:38
+#: templates/admin/login.html:37
msgid "Password:"
msgstr ""
-#: templates/admin/login.html:45
+#: templates/admin/login.html:44
msgid "Forgotten your password or username?"
msgstr ""
-#: templates/admin/object_history.html:24
+#: templates/admin/object_history.html:23
msgid "Date/time"
msgstr ""
-#: templates/admin/object_history.html:25
+#: templates/admin/object_history.html:24
msgid "User"
msgstr ""
-#: templates/admin/object_history.html:26
+#: templates/admin/object_history.html:25
msgid "Action"
msgstr ""
-#: templates/admin/object_history.html:40
+#: templates/admin/object_history.html:39
msgid ""
"This object doesn't have a change history. It probably wasn't added via this "
"admin site."
@@ -601,147 +592,147 @@ msgstr ""
msgid "Enter a username and password."
msgstr ""
-#: templates/admin/auth/user/change_password.html:33
+#: templates/admin/auth/user/change_password.html:31
#, python-format
msgid "Enter a new password for the user <strong>%(username)s</strong>."
msgstr ""
-#: templates/admin/auth/user/change_password.html:40
+#: templates/admin/auth/user/change_password.html:38
msgid "Password"
msgstr ""
-#: templates/admin/auth/user/change_password.html:46
-#: templates/registration/password_change_form.html:43
+#: templates/admin/auth/user/change_password.html:44
+#: templates/registration/password_change_form.html:42
msgid "Password (again)"
msgstr ""
-#: templates/admin/auth/user/change_password.html:47
+#: templates/admin/auth/user/change_password.html:45
msgid "Enter the same password as above, for verification."
msgstr ""
-#: templates/admin/edit_inline/stacked.html:67
-#: templates/admin/edit_inline/tabular.html:115
-#, python-format
-msgid "Add another %(verbose_name)s"
+#: templates/admin/edit_inline/stacked.html:26
+#: templates/admin/edit_inline/tabular.html:76
+msgid "Remove"
msgstr ""
-#: templates/admin/edit_inline/stacked.html:70
-#: templates/admin/edit_inline/tabular.html:118
-msgid "Remove"
+#: templates/admin/edit_inline/stacked.html:27
+#: templates/admin/edit_i