Merge pull request #554 from cbjadwani/Fix_AttributeError_in_offline_compression
Fix AttributeError in offline compression
This commit is contained in:
@@ -54,6 +54,8 @@ def remove_block_nodes(nodelist, block_stack, block_context):
|
||||
if not block_stack:
|
||||
continue
|
||||
node = block_context.get_block(block_stack[-1].name)
|
||||
if not node:
|
||||
continue
|
||||
if isinstance(node, BlockNode):
|
||||
expanded_block = expand_blocknode(node, block_stack, block_context)
|
||||
new_nodelist.extend(expanded_block)
|
||||
|
@@ -5,4 +5,9 @@
|
||||
<script type="text/javascript">
|
||||
alert("this alert shouldn't be alone!");
|
||||
</script>
|
||||
{% block orphan %}
|
||||
{{ block.super }}
|
||||
An 'orphan' block that refers to a non-existent super block.
|
||||
Contents of this block are ignored.
|
||||
{% endblock %}
|
||||
{% endspaceless %}{% endblock %}
|
||||
|
Reference in New Issue
Block a user