Commit Graph

11248 Commits

Author SHA1 Message Date
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
Adrian Holovaty 073d987a84 Fixed #16818 -- Fixed ORM bug with many-to-many add() method where it wasn't committing the change. Thanks, pressureman and kmtracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17189 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 23:16:56 +00:00
Adrian Holovaty 594a45ed29 Fixed some comma splices in the 'Insert in bulk' section of db/optimization.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17188 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 23:14:04 +00:00
Aymeric Augustin 19cbdf8c8f Fixed #17348 -- Implemented {% elif %}. Refs #3100.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17187 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 22:13:27 +00:00
Aymeric Augustin 959f78b3c6 Fixed #3100 -- Added support for arguments on intermediate tag tokens.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17186 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 22:10:52 +00:00
Adrian Holovaty 718a5ba1a1 Fixed #16845 -- Admin 'Change user' page no longer shows the password hash. Thanks, dstufft
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17185 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 22:10:03 +00:00
Jannis Leidel f450d7d716 Fixed copy & paste mistake made in r17183.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:53:21 +00:00
Jannis Leidel 154438e315 Fixed #16683 -- Skip the IPv6 runserver tests if the platform doesn't support it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:50:28 +00:00
Adrian Holovaty 1a8b40c9fa Checking in latest results of running Google Closure Compiler on the admin JS. Looks like they changed the compiler output for 'false'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17182 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:43:24 +00:00
Adrian Holovaty cfb7e477d3 Fixed #17218 -- Fixed bug with SelectFilter where the 'to' box had a height=0 when it was within a collapsed fieldset. Thanks jimallman
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17181 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:41:20 +00:00
Adrian Holovaty 5c1c1a1254 Changed admin/js/collapse.js to take advantage of jQuery chaining in three places. Should make for a slight performance boost.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:30:53 +00:00
Adrian Holovaty ce247476af Removed way-outdated comment in SelectFilter2.js admin JS file. And we should rename this to SelectFilter.js at some point
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17179 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-09 21:09:59 +00:00