Commit Graph

23 Commits

Author SHA1 Message Date
Claude Paroz 883c38c499 Fixed #17848 -- Added setting_changed signal for cases when TEMPLATE_CONTEXT_PROCESSORS is overriden in tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-09 13:24:57 +00:00
Aymeric Augustin eb163f37cb Use the class decorator syntax available in Python >= 2.6. Refs #17965.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 09:08:29 +00:00
Julien Phalip c1a014bba4 Made some `contrib.messages` tests use `override_settings` for clarity. Thanks to Claude Paroz for the patch. Refs #16507, #16574.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-25 02:55:25 +00:00
Julien Phalip adf51b0cb8 Fixed #16574 -- Strengthened the `contrib.messages` tests' isolation to avoid failures under certain project setting environments. Thanks to Boldewyn for the report and to Claude Paroz for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 23:39:09 +00:00
Ramiro Morales 26b8122087 Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
This applies to both our own [test] code and documentation examples. Also:
 * Moved the functions and handlers from `django.conf.urls.defaults` up to
   `django.conf.urls` deprecating the former module.
 * Added documentation for `handler403`.
 * Tweaked the URLs topic document a bit.

Thanks to pupeno and cdestigter for their great work contributing patches.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Luke Plant 8d4b414760 Fixed #15757 - removed remaining instances of get_and_delete_messages
Thanks to void for the report, and julien for the bulk of the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-07 22:01:23 +00:00
Russell Keith-Magee 5d5149cd18 Advanced deprecation of user-based messages and the LegacyFallbackStorage in contrib.messages.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:36:04 +00:00
Jannis Leidel 7c738cd3e8 Fixed #15618 -- Fixed regression introduced in r15848 regarding not properly deleting messages cookies when honoring SESSION_COOKIE_DOMAIN. Thanks, Julien.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-20 11:27:03 +00:00
Russell Keith-Magee b49ee91eb3 Fixed #15142 -- Force test views to be non-cached so that projects with caching middleware enabled don't cause test failures. Thanks to jsdalton for the report and patch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-17 08:07:40 +00:00
Russell Keith-Magee afd040d4d3 Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
assert_ -> assertTrue
 assertEquals -> assertEqual
 failUnless -> assertTrue

For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00
Russell Keith-Magee 514c0b5eb4 Fixed #15016 -- Ensured that the messages tests are isolated from local template directories. Thanks to Gabriel Hurley for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15407 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 14:33:11 +00:00
Russell Keith-Magee e0dcd7666a Fixed #12815 -- Added TemplateResponse, a lazy-evaluated Response class. Thanks to Simon Willison for the original idea, and to Mikhail Korobov and Ivan Sagalaev for their assistance, including the draft patch from Mikhail.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-07 13:57:01 +00:00
Jannis Leidel ff63a5bdec Fixed #14632 -- Skip a messages test if auth app is not in INSTALLED_APPS. Thanks, gregmuellegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14557 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-13 18:43:13 +00:00
Luke Plant 02fc6276d7 Fixed #14508 - test suite silences warnings.
Utility functions get_warnings_state and save_warnings_state have been added
to django.test.utils, and methods to django.test.TestCase for convenience.

The implementation is based on the catch_warnings context manager from
Python 2.6.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-11 15:06:20 +00:00
Russell Keith-Magee 121d2e3678 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:55:17 +00:00
Russell Keith-Magee 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +00:00
Karen Tracey 8661cb9bd3 Fixed #13170: Make get_level and set_level importable from django.contrib.messages,
as documented. Thanks dm, SmileyChris, tobias.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@12826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-03-21 13:47:50 +00:00
Luke Plant e6c5599494 Reduced CookieStorage.max_cookie_size to 75% of 4K to be nice to Internet Explorer
Internet Explorer, up to at least version 7, allows only 4K cookie data *per
domain*, rather than per cookie, so we ensure that stored messages leave
some room for other cookies.




git-svn-id: http://code.djangoproject.com/svn/django/trunk@12287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-24 00:04:02 +00:00
Luke Plant 09b585e4bb Fixed #12588 - test failure since r12207
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12215 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 22:03:00 +00:00
Luke Plant c56beed240 Fixed #12575 - created a better interface for getting/setting the effective level of contrib.messages
Thanks Chris Beaven.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12207 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-12 02:41:57 +00:00
Karen Tracey cafb12464b Fixed #12368: Fixed order-dependent messages test that was failing on MySQL/MyISAM. Thanks Tobias.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13 17:20:36 +00:00
Luke Plant 25020ddb05 Fixed #4604 - Configurable message passing system, supporting anonymous users
This deprecates User.message_set in favour of a configurable messaging
system, with backends provided for cookie storage, session storage and
backward compatibility.

Many thanks to Tobias McNulty for the bulk of the work here, with
contributions from Chris Beaven (SmileyChris) and lots of code review from
Russell Keith-Magee, and input from many others.  Also credit to the authors
of various messaging systems for Django whose ideas may have been pinched
:-)



git-svn-id: http://code.djangoproject.com/svn/django/trunk@11804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-09 16:57:23 +00:00