Permalink
Browse files

Merge pull request #960 from stephrdev/feature/fix_cached_loader

Placeholder scanning is broken with cached template loader.
  • Loading branch information...
2 parents 5e9e4bb + 88f5784 commit a129321deb50a6b5d220746d575dc99e01da51aa @ojii ojii committed Aug 25, 2011
Showing with 14 additions and 4 deletions.
  1. +3 −1 cms/utils/plugins.py
  2. +11 −3 tests/project/settings.py
View
@@ -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
@@ -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 a129321

Please sign in to comment.