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.
This commit is contained in:
committed by
Matt Westcott
parent
5654b0506d
commit
7e47c0b4da
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user