Commit Graph

24 Commits

Author SHA1 Message Date
Loic Bistuer 942556df2f Fixed #22572 -- override_settings(ROOT_URLCONF) didn't clear urlresolvers._urlconfs.
Thanks Anubhav Joshi and Tim Graham for the reviews.
2014-05-05 19:29:27 +07:00
Rodolfo Carvalho 0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Chris Wilson 65131911db Fixed #21518 -- Made override_settings(ROOT_URLCONF) clear the resolver cache.
Thanks Aymeric Augustin and Simon Charette for reviews.
2014-02-07 15:29:25 -05:00
Aymeric Augustin b87bc461c8 Removed TransRealMixin.
Fixed #21688. Refs https://github.com/django/django/pull/1147.
2014-01-27 22:02:07 +01:00
Aymeric Augustin 3145ae06be Minor cleanup. 2014-01-27 22:01:22 +01:00
Aymeric Augustin f17d00278e Wiped get_commands() cache when INSTALLED_APPS changes.
Refs #21018, #21688.
2014-01-01 18:11:09 +01:00
Florian Apolloner 98b52ae201 Cleared global templatetags module cache.
TOOOOO MUCH GLOBAL STATE (you didn't see that).
2013-12-29 19:17:25 +01:00
Florian Apolloner 6aa1a31660 Properly app_template_dirs when INSTALLED_APPS change. 2013-12-27 11:17:25 +01:00
Aymeric Augustin 5891990b6e Refactored INSTALLED_APPS overrides.
* Introduced [un]set_installed_apps to handle changes to the
  INSTALLED_APPS setting.
* Refactored [un]set_available_apps to share its implementation
  with [un]set_installed_apps.
* Implemented a receiver to clear some app-related caches.
* Removed test_missing_app as it is basically impossible to reproduce
  this situation with public methods of the new app cache.
2013-12-23 20:15:08 +01:00
Aymeric Augustin 517c24bcfa Complained on override_settings(INSTALLED_APPS=...).
Currently such overrides aren't reflected in the app cache.

It would  be possible to handle them. But that doesn't look like a very
good API. It makes it complicated to express "add this app" and "remove
this app", which are the most common operations on INSTALLED_APPS.
2013-12-22 11:39:18 +01:00
Aymeric Augustin eabc3b6c8d Set stacklevel for the override_settings warning.
Refs #19031.
2013-12-20 11:09:06 +01:00
Curtis Maloney ffc37e2343 Fixed #21012 -- New API to access cache backends.
Thanks Curtis Malony and Florian Apolloner.

Squashed commit of the following:

commit 3380495e93
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:18:07 2013 +0100

    Looked up the template_fragments cache at runtime.

commit 905a74f52b
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 14:19:48 2013 +0100

    Removed all uses of create_cache.

    Refactored the cache tests significantly.

    Made it safe to override the CACHES setting.

commit 35e289fe92
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:23:57 2013 +0100

    Removed create_cache function.

commit 8e274f747a
Author: Aymeric Augustin <aymeric.augustin@m4x.org>
Date:   Sat Nov 23 12:04:52 2013 +0100

    Updated docs to describe a simplified cache backend API.

commit ee7eb0f73e
Author: Curtis Maloney <curtis@tinbrain.net>
Date:   Sat Oct 19 09:49:24 2013 +1100

    Fixed #21012 -- Thread-local caches, like databases.
2013-11-23 15:06:59 +01:00
Joeri Bekker 66f3d57b79 Fixed #19031 -- Added a warning when using override_settings with 'DATABASES' 2013-07-12 07:10:18 -04:00
Claude Paroz 9a02851340 Fixed #17744 -- Reset default file storage with setting_changed signal 2012-10-30 22:23:28 +01:00
Claude Paroz c7f44ae085 Fixed #17948 -- Isolated auth tests from custom template loaders
Thanks andrey@kostenko.name for the report.
2012-09-15 21:39:08 +02:00
Claude Paroz 4353a6163c Fixed #18196 -- Improved loaddata error messages. 2012-08-21 21:52:25 +02:00
Claude Paroz 32a4df6c55 Fixed #18395 -- Reset language-related global variables with setting_changed 2012-07-21 13:49:07 +02:00
Aymeric Augustin a15cfb2e45 Simplified timezones tests with settings_changed.
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ
are changed in tests.
2012-04-29 16:03:46 +02:00
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 3ef55dfaa0 Fixed #17882 (again) -- Updated the database connections' time zone when time-zone-related settings are changed in tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 23:29:15 +00:00
Aymeric Augustin aa900c39a8 Fixed #17882 -- Reopened the database connection when a test changes time zone settings. Thanks brodie for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-13 06:59:04 +00:00
Jannis Leidel a3a53e0b73 Fixed #15561 -- Extended test setting override code added in r16165 with a decorator and a signal for setting changes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16237 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-18 12:08:53 +00:00
Jacob Kaplan-Moss 34a3bd5225 Major refactoring of django.dispatch with an eye towards speed. The net result is that signals are up to 90% faster.
Though some attempts and backwards-compatibility were made, speed trumped compatibility. Thus, as usual, check BackwardsIncompatibleChanges for the complete list of backwards-incompatible changes.

Thanks to Jeremy Dunck and Keith Busell for the bulk of the work; some ideas from Brian Herring's previous work (refs #4561) were incorporated.

Documentation is, sigh, still forthcoming.

Fixes #6814 and #3951 (with the new dispatch_uid argument to connect).


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8223 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-06 15:32:46 +00:00
Russell Keith-Magee d043200077 Refs #2333 - Re-added the template rendering signal for testing purposes; however, the signal is not available during normal operation. It is only added as part of an instrumentation step that occurs during test framework setup. Previous attempt (r3659) was reverted (r3666) due to performance concerns.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-02 09:26:24 +00:00