From 7e47c0b4dad5a3797f34b78e37ce846e20c28a4b Mon Sep 17 00:00:00 2001 From: Stefan Wehrmeyer Date: Wed, 29 Jul 2015 15:56:37 +0200 Subject: [PATCH] Make a copy of offline context before using The offline context dictionary can be changed by the extends node (or a subclass like django-overextends). To prevent carrying over state from previous parsings, make a copy of the offline context. --- compressor/offline/django.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compressor/offline/django.py b/compressor/offline/django.py index 107c6e4..2b229fa 100644 --- a/compressor/offline/django.py +++ b/compressor/offline/django.py @@ -26,7 +26,7 @@ def handle_extendsnode(extendsnode, block_context=None, original=None): extendsnode.nodelist.get_nodes_by_type(BlockNode)) block_context.add_blocks(blocks) - context = Context(settings.COMPRESS_OFFLINE_CONTEXT) + context = Context(dict(settings.COMPRESS_OFFLINE_CONTEXT)) if original is not None: context.template = original