Commit Graph

11259 Commits

Author SHA1 Message Date
Julien Phalip 45e3dff5ac Ensured that `makemessages` doesn't leave any temporary file over if the parsing of a template file fails. Refs #8536.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17240 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-21 15:35:58 +00:00
Jannis Leidel 39109b0e44 Fixed Sphinx warning.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17239 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-21 11:05:43 +00:00
Aymeric Augustin 295fd50752 Fixed a typo in the model fields reference.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17238 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-20 17:03:13 +00:00
Ramiro Morales 554f0601b5 Stopped unconditionally reversing admin model add/change URLs.
Starting with [16857] this could cause HTTP 500 errors when
`ModelAdmin.get_urls()` has been customized to the point it doesn't
provide these standard URLs.

Fixes #17333. Refs #15294.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 14:59:14 +00:00
Julien Phalip 259ebcdeea Fixed #17408 -- Cleaned up some namings in `contrib.formtools`. Thanks, Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17236 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 13:52:40 +00:00
Julien Phalip 355f7fc564 Fixed #17163 -- Added the `NamedUrlWizardView.get_step_url()` method. Thanks, Bradley Ayers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 13:36:32 +00:00
Julien Phalip 1ef6841cad Fixed #17162 -- Removed the useless `WizardView.get_wizard_name()` method. Thanks, Bradley Ayers and Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 13:13:41 +00:00
Julien Phalip ed56e2c4a8 Fixed #17151 -- Renamed `wizard_prev_step` to the clearer `wizard_goto_step` in `NamedUrlWizardView`. Thanks, Bradley Ayers and Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 12:58:18 +00:00
Julien Phalip ad5df5119f Fixed #17150 -- Made `NamedUrlWizardView.url_name` available in the template context. Thanks to Bradley Ayers for the suggestion and to Stephan Jaekel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 12:28:39 +00:00
Julien Phalip 3e790ae632 Fixed #17148 -- Fixed the signature of `WizardView.get_context_data()` to play nicer with mixin inheritance. Thanks, Bradley Ayers and Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 12:11:12 +00:00
Ramiro Morales 5a48cb5f61 Added note about assertFieldOutput being new in 1.4.
Thanks dpifke for report and patch.

Fixes #17433

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17230 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-19 11:53:16 +00:00
Ramiro Morales 5003df3659 Tweaked changes from r17228 to cater for older simplejson versions.
dump() started accepting the `use_decimal` argument in 2.1.3.

Refs #16850.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17229 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 23:00:41 +00:00
Ramiro Morales b5d9ad982d Fixed #16850 -- Made sure we always represent Decimal instances with JS strings when serializing.
We force this when calling simplejson dump() to isolate us from changes of
default behavior to encode them with JavaScript numbers instead that could
introduce loss of precision when decoding back from JSON to Python.

Thanks Raphael Hertzog for the report and Bob Ippolito for his help.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 22:10:37 +00:00
Adrian Holovaty e31c43a360 Optimized an optimise
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17227 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 17:38:08 +00:00
Adrian Holovaty 20c8aa2a20 Fixed various dodgy behaviours
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17226 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 17:37:24 +00:00
Aymeric Augustin c7534584e8 Explained why UserCreationForm performs custom validation of usernames. Refs #13147.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17225 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 15:30:55 +00:00
Aymeric Augustin a4e516b593 Fixed #11166 -- {% widthratio %} should return 0 when the maximum is 0, no matter the value.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 10:27:14 +00:00
Adrian Holovaty 8767439af4 Converted some of the built-in views to use content_type instead of mimetype HttpResponse argument. Refs #16519
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 03:53:25 +00:00
Adrian Holovaty d3055b3382 Quick edit of docs/topics/security.txt to catch some basic formatting problems and reword an awkward section
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17222 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:48:27 +00:00
Adrian Holovaty bfb4ed1425 Negligible spacing fixes to comments in django/http/__init__.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:40:35 +00:00
Adrian Holovaty 81bf5e3950 Fixed comma splice in DeprecationWarning for CompatCookie
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:37:26 +00:00
Adrian Holovaty 637a70fa7b Negligible spacing cleanup in utils/dateparse.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:31:34 +00:00
Adrian Holovaty 286c5c811b Fixed #17233 -- Fixed typo in defaultfilters.py docstring. Thanks, aalexapolsky
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:27:00 +00:00
Adrian Holovaty fefbb66bac Fixed #17322 -- Added an example import statement to the HttpResponse docs. Thanks, RoySmith
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:19:14 +00:00
Adrian Holovaty 913b39b37f Fixed #17422 -- Changed BaseDetailView to use *args, to be consistent with other views
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:16:52 +00:00
Adrian Holovaty 1bf58154f7 Fixed #17330 -- Fixed error in logging.txt. Thanks, jblaine
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:15:01 +00:00
Adrian Holovaty 2494dd25f5 Fixed #17364 -- Fixed typos in topics/testing.txt. Thanks, movielady
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17214 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:03:56 +00:00
Adrian Holovaty a848ef4e57 Fixed #17423 -- Fixed three typos in GeoDjango docs. Thanks, DavidEklund
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17213 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 02:00:20 +00:00
Adrian Holovaty 6cca104be0 Fixed some failing tests due to creation of HttpRequest._is_secure() methods in [17209]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17212 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-17 00:17:26 +00:00
Carl Meyer 1b312edbeb Refs #17323 -- Updated a test to use try/finally to avoid state leakage. Thanks dstufft for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 23:50:34 +00:00
Adrian Holovaty 3f003a3c4b Fixed #17323 -- Renamed HttpRequest.raw_post_data to request.body. Thanks for the patch, dstufft
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17210 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 23:40:32 +00:00
Adrian Holovaty 61f0aff811 Fixed #14597 -- Added a SECURE_PROXY_SSL_HEADER setting for cases when you're behind a proxy that 'swallows' the fact that a request is HTTPS
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17209 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 22:06:06 +00:00
Adrian Holovaty 4d32e6abc2 Removed incorrect comment in core/handlers/modpython.py. If it were true, the modpython handler wouldn't be working, because the handler's module imports from django.http, which includes a settings import
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17208 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 20:37:12 +00:00
Adrian Holovaty 082cfce185 Negligible typo fix in a comment in handlers/wsgi.py
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 20:21:16 +00:00
Julien Phalip a1d2f1f7b7 Ensured that thread-shareability gets validated when closing a PostgreSQL or SQLite connection. Refs #17258.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17206 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 17:02:41 +00:00
Julien Phalip 34e248efec Fixed #17258 -- Moved `threading.local` from `DatabaseWrapper` to the `django.db.connections` dictionary. This allows connections to be explicitly shared between multiple threads and is particularly useful for enabling the sharing of in-memory SQLite connections. Many thanks to Anssi Kääriäinen for the excellent suggestions and feedback, and to Alex Gaynor for the reviews. Refs #2879.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-16 13:40:19 +00:00
Jannis Leidel 5df31c0164 Fixed #17194 -- Made sure the auth form tests work if a language other than English is activated by moving the error message translation strings into class level dictionaries. Many thanks to Claude Paroz, rabio and Bas Peschier for their initial work on this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 16:12:46 +00:00
Ramiro Morales e7b5e22484 Expanded section about lazy translation in i18n docs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17203 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 11:04:57 +00:00
Luke Plant 655b29b5ba Fixed #16563 - Error pickling request.user
Thanks to zero.fuxor for the report

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17202 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-15 02:33:14 +00:00
Julien Phalip 46c1d1551f Fixed a url to the contributing guide in a code comment.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-14 14:49:00 +00:00
Luke Plant a935d436e9 Fixed #15863 - SimpleCookies are not correctly serialized with the file or database cache backends
Thanks to rakuco for the report and for the tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17200 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 21:04:56 +00:00
Aymeric Augustin 58276bd338 Fixed #17377 -- Don't depend on a warm cache in admin_views.UserAdminTest.test_user_permission_performance. Thanks Gregor Müllegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 12:04:37 +00:00
Aymeric Augustin 694bc0f22b Fixed #16397 -- Respected the --traceback flag in BaseCommand. This should make import loops easier to debug. Refs #11667, #17369.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 10:03:09 +00:00
Aymeric Augustin affca1369c Fixed #16632 -- Crash on responses without Content-Type with IE. Thanks juan for the report and kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17196 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:58:14 +00:00
Aymeric Augustin 545c3159f5 Fixed #17251 -- In the select_for_update tests, close manually database connections made in threads, so they don't stay "idle in transaction" until the GC deletes them. Thanks Anssi Kääriäinen for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17195 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:43:01 +00:00
Aymeric Augustin 219b41cc15 Fixed #17266 -- Skipped the "SET TIME ZONE" query for PostgreSQL when it isn't necessary.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17194 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 08:19:04 +00:00
Ramiro Morales d317f2ab98 Added another `from__future__ import with_statement` missed in r17190.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17193 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 01:00:41 +00:00
Ramiro Morales f2e99ecfda Made makemessages leave `'%%'` sequences untouched when extracting translatable literals from blocktrans template tags.
This makes it consistent with behavior introduced when fixing #11240 in
processing of literal passed to the trans tag to avoid double escaping
(i.e. `'%%%%'` sequences in resulting PO files.)

Also, cleaned up tests changes from r17190 (removed commented out code and
implemented compatibility with Python 2.5.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:48:26 +00:00
Ramiro Morales 12a20b6c22 Added files missing from commit [17190]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17191 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:09:30 +00:00
Ramiro Morales ff7556c4ec Fixed #11240 -- Made makemessages i18n command escape % symbols in literals passed to the trans tag.
This avoids problems with unintended automatic detection, marking and
validation of Python string formatting specifiers performed by
xgettext(1)/msgfmt(1) that stem from the fact that under the hood makemessages
converts templates to Python code before passing them to xgettext.

This also makes it consistent with its behavior on literals passed to the
blocktrans tag.

Thanks Jannis and claude for reviewing and feedback.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17190 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-11 00:07:06 +00:00