Commit Graph

9185 Commits

Author SHA1 Message Date
Jannis Leidel 83aeb3c768 Fixed #9988 -- Added support for translation contexts. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 10:48:27 +00:00
Alex Gaynor 0659391baf Converted templates doctests into unittests. We have always been at war with doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 04:47:05 +00:00
Justin Bronn cabc21ca60 Fixed #14318 -- Added `GEOSGeometry.valid_reason` property. Thanks, Rob Coup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14447 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 01:29:37 +00:00
Alex Gaynor 877033b479 Sped up the create_permissions signal handler (and thus the test suite) by restructuring its queries.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14446 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 00:01:54 +00:00
Justin Bronn d8e311c8d1 Updated OpenLayers (now points to 2.10) and OpenStreetMap JavaScript URLs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 19:31:14 +00:00
Alex Gaynor 222c732616 Fixed #10728 -- corrected subclassing of Fields who use the SubfieldBase metaclass. Thanks to G2P and George Sakkis for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 18:40:53 +00:00
Alex Gaynor 352deb0915 Fixed #14559 -- corrected some typos and misleading docstrings. Thanks to Gabriel Hurley for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 18:30:00 +00:00
Carl Meyer 4ba6348a00 Fixed #14598 -- Changed some 'domain.com' uses to 'example.com'
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 16:19:17 +00:00
Russell Keith-Magee a89e02637b Fixed #13567 -- Added a 'silent' argument to the cycle tag, so that you can declare a cycle without producing a value in the template. Thanks to anentropic for the suggestion and initial patch, and Łukasz Rekucki for the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14439 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 13:42:30 +00:00
Gabriel Hurley bb062c376f Fixed #14584 -- Documented settings.PASSWORD_RESET_TIMEOUT_DAYS. Also fixed some cross-refs in the neighborhood. Thanks to hop for the report and Adam Mckerlie for the draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14437 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 11:53:01 +00:00
Russell Keith-Magee 3e62e253d2 Fixed #14594 -- Corrected r14435, which got the logic completely bass ackwards. Thanks to Mark Sundstrom for keeping me honest :-)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14436 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 08:30:01 +00:00
Russell Keith-Magee 32f650cfcc Fixed #14594 -- Corrected a problem introduced by r14394 whereby reading POST data when running a WSGI server under CherryPy would hang. Thanks to Mark Sundstrom for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 07:38:06 +00:00
Russell Keith-Magee 1fc7c4aee4 Fixed #14596 -- Light refactoring of the cache backends.
* Removes some code duplication,
 * Provides a convenient base class for db-like cache backends
 * Adds tests for an edge case of culling,
 * Marks the memcached tests as "skipped", rather than omitting them.

Thanks to Jonas H for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:55:08 +00:00
Alex Gaynor ed51dd5d64 Avoid an O(n**2) operation where O(n) will suffice. Possibly worth a second or two when running the test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14433 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:41:46 +00:00
Alex Gaynor 89219a6829 Fixed a few more cases of the tests not properly restoring sys.path (follow up on [14429]).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14431 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:31:19 +00:00
Alex Gaynor 7dfefa74ca Properly handle the fact that lists are mutable when trying to maintain state in a test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:27:24 +00:00
Russell Keith-Magee 909c44e1aa Migrated app_loading doctests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:21:48 +00:00
Russell Keith-Magee c10d41c821 Fixed #14470 -- Migrated modeladmin doctests. Thanks to Preston Timmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14425 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 05:09:16 +00:00
Russell Keith-Magee e57cd291cc Migrated lookup doctests. Thanks to George Sakkis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14423 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 04:01:36 +00:00
Russell Keith-Magee 4a15719405 Migrated basic doctests. Thanks to Preston Timmons for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14421 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 02:32:23 +00:00
Russell Keith-Magee e0a1e474b6 Migrated m2m_through doctests. Thanks to the anonymous contributor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14419 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-02 02:00:16 +00:00
Russell Keith-Magee 3d96540b80 Added a filter to silence the RuntimeWarning in the Indonesian localflavor tests. Thanks to Alex for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 23:46:37 +00:00
Justin Bronn 1ee4274ff1 Fixed some a stale location and whitespace in GeoIP tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 22:18:22 +00:00
Justin Bronn 315ae1ce6e Fixed regression introduced in r13755 that prevented the running of the GEOS/GDAL test suites without configuring Django settings; moved reference geometry data from Python module to compressed JSON fixture; put in workaround in tests for GDAL bug #3783.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 21:56:48 +00:00
Alex Gaynor 34e545a938 Restructure the create_permission signal handler to perform fewer SQL queries, this speeds up the test suite dramatically.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 20:54:39 +00:00
Carl Meyer 21d6fb6062 Removed dead compatibility code for removed AdminSite.root() method for mounting admin urls.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 17:22:13 +00:00
Russell Keith-Magee 5c05233ffc Fixed #14455 -- Documented the backwards compatibility policy for local flavors. Implemented the policy for the changes in the Indonesian local flavor (from r14195) that stimulated the development of this policy. Thanks to Karen, Alex, Ramiro and Chris for their help developing the policy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-01 00:52:58 +00:00
Alex Gaynor 799a3057cd Fixed a typo in the class based views docs, thanks to lasko for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 23:32:38 +00:00
Alex Gaynor 282e53b499 Reflow django/contrib/auth/management/__init__.py for readability.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14408 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 16:49:36 +00:00
Alex Gaynor 15b3350d30 Fixed the auth tests so they work when the AUTHENTICATION_BACKENDS setting is a list. Thanks to Patrick Altman for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14406 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 16:25:29 +00:00
Alex Gaynor 6824c9b796 Ensure that assertNumQueries doesn't swallow exceptions inside the function.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14405 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 08:29:07 +00:00
Ramiro Morales 429473a522 Fixed #13503 -- Corrected misleading custom permission example in the docs.
Thanks Daniel Moisset for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14403 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 02:34:01 +00:00
Alex Gaynor fa8f0cb2d8 When looking for django tables which exist, query for all tables once, not once *per table*.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-31 00:53:58 +00:00
Alex Gaynor aa951eb8ea Ensure that the staticfiles tests use the MEDIA_ROOT they intended, also use a more approrpiate datastructure in collectstatic.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14401 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 23:39:53 +00:00
Russell Keith-Magee 03b12ae2cf Rewrote a test assertion so that it doesn't fail under Python 2.7. Thanks to Florian Apolloner for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 13:04:02 +00:00
Russell Keith-Magee fffbbe4062 Reordered the shutdown process for tests so that all tests force a connection close. This is required to prevent some cross-test failures. Thanks to Florian Apolloner for the report and help tracking down the problem.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14399 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 13:03:37 +00:00
Russell Keith-Magee 52e0bcbc62 Fixed #14588 -- Corrected r14393 to ensure that response middlewares are are always applied. Includes a battery of tests to validate the expected behavior of the middleware cycle. Thanks to Petr Marhoun for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 07:19:04 +00:00
Russell Keith-Magee 20e09ca817 Fixed #14589 -- Corrected a copy-and-paste error introduced in r14395. Thanks to Adam McKerlie for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14397 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 04:28:43 +00:00
Alex Gaynor bc6d7d2102 Sped up the staticfiles_tests by allowing them to only search a few relevant directories, rather than every single test application.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-30 04:24:24 +00:00
Russell Keith-Magee ccc49029b8 Fixed #14181 -- Added a template tag and filters to allow localization to be disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:48:58 +00:00
Russell Keith-Magee 269e921756 Fixed #9886 -- Added a file-like interface to HttpRequest. Thanks to Ivan Sagalaev for the suggestion and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:39:25 +00:00
Russell Keith-Magee 3086b55b0e Fixed #14523 -- Modified response handling so that exceptions raised by process_response() in a middleware are caught and handled like any other exception. Thanks to Ivan Sagalaev for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14393 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 07:43:56 +00:00
Alex Gaynor c38a174f7c Remove several uses of the deprecated dict.has_key in favor of the in operator. This is faster, has less code, and is in every single way better.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 04:24:53 +00:00
Honza Král cb17f7ca22 Fixed #14560 -- Enable HEAD requests to be cached properly. Thanks, codemonkey!
Introducing ability to cache HEAD requests and GET requests separately by
adding the method to the cache key while preserving the functionality that HEAD
requests can use cached reponses generated by a GET request.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 01:31:15 +00:00
Russell Keith-Magee 8a724802c5 Fixed #14471 -- Corrected a regression in the use of methods on custom managers on related querysets. Thanks to Lucky for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14389 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 12:57:04 +00:00
Russell Keith-Magee ded416bc7e Corrected to markup problems with docs added for recent features.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14388 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 12:56:44 +00:00
Russell Keith-Magee 98753710a7 Added documentation note for the backwards incompatible change in r13996.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 12:36:51 +00:00
Russell Keith-Magee ea85d4303d Fixed #14231 -- Added an index to the expire_date column on the Session model. Thanks to joeri for the report, via Frodo from Medid.
This won't affect any existing session tables; see the release notes for migration instructions.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 11:56:37 +00:00
Luke Plant 90ac02300e Fixed #14565 - No csrf_token on 404 page.
This solution doesn't have the negative side-effects of [14356].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14377 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 11:47:15 +00:00
Luke Plant 144ab8877f Reverted changeset [14356]
That fix for #14565 introduced test failures.  A better fix will
follow shortly.

Refs #14565

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14376 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-28 11:46:57 +00:00