diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-11-14 15:48:27 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-11-23 09:29:53 +0100 |
| commit | 572cdb43917ad860acaaffecd60b4e92599ae3eb (patch) | |
| tree | 8bb0252292319d346d0b156384b9a3f61a0a8d10 /django/test | |
| parent | 17012b6936128fb771b98e4fa6d78caddd07a9a8 (diff) | |
Introduced a template engine class.
Moved Django templates loading infrastructure there.
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/signals.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/django/test/signals.py b/django/test/signals.py index b8e7193087..013d293203 100644 --- a/django/test/signals.py +++ b/django/test/signals.py @@ -78,6 +78,19 @@ def update_connections_time_zone(**kwargs): @receiver(setting_changed) +def reset_default_template_engine(**kwargs): + if kwargs['setting'] in { + 'TEMPLATE_DIRS', + 'ALLOWED_INCLUDE_ROOTS', + 'TEMPLATE_CONTEXT_PROCESSORS', + 'TEMPLATE_LOADERS', + 'TEMPLATE_STRING_IF_INVALID', + }: + from django.template.engine import Engine + Engine.get_default.cache_clear() + + +@receiver(setting_changed) def clear_context_processors_cache(**kwargs): if kwargs['setting'] == 'TEMPLATE_CONTEXT_PROCESSORS': from django.template.context import get_standard_processors |
