Skip to content
Browse files

This fixes the placeholder scanning/template parsing when using the c…

…ached template loader.

Without this fix the test suite will freeze/infinite loop while parsing the templates.
  • Loading branch information...
1 parent 03e7d01 commit 88f578476a5b1951b3b3f2bef58bb0d2e7076fd8 @stephrdev stephrdev committed Aug 20, 2011
Showing with 14 additions and 4 deletions.
  1. +3 −1 cms/utils/plugins.py
  2. +11 −3 tests/project/settings.py
View
4 cms/utils/plugins.py
@@ -30,7 +30,9 @@ def _extend_blocks(extend_node, blocks):
else:
# set this node as the super node (for {{ block.super }})
block = blocks[node.name]
- while hasattr(block.super, 'nodelist'):
+ seen_supers = []
+ while hasattr(block.super, 'nodelist') and block.super not in seen_supers:
+ seen_supers.append(block.super)
block = block.super
block.super = node
# search for further ExtendsNodes
View
14 tests/project/settings.py
@@ -43,10 +43,18 @@
SECRET_KEY = '*xq7m@)*f2awoj!spa0(jibsrz9%c0d=e(g)v*!17y(vx0ue_3'
+#TEMPLATE_LOADERS = (
+# 'django.template.loaders.filesystem.Loader',
+# 'django.template.loaders.app_directories.Loader',
+# 'django.template.loaders.eggs.Loader',
+#)
+
TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.Loader',
- 'django.template.loaders.app_directories.Loader',
- 'django.template.loaders.eggs.Loader',
+ ('django.template.loaders.cached.Loader', (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+ 'django.template.loaders.eggs.Loader',
+ )),
)
TEMPLATE_CONTEXT_PROCESSORS = [

0 comments on commit 88f5784

Please sign in to comment.
Something went wrong with that request. Please try again.