Author: mbonetti
Date: Mon May 4 06:21:04 2009
New Revision: 497
Modified:
branches/electron/pages/utils.py
Log:
follow template inclusions when looking for placeholders
Modified: branches/electron/pages/utils.py
==============================================================================
--- branches/electron/pages/utils.py (original)
+++ branches/electron/pages/utils.py Mon May 4 06:21:04 2009
@@ -9,7 +9,7 @@
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.template import loader, Context, RequestContext,
TemplateDoesNotExist
-from django.template.loader_tags import ExtendsNode
+from django.template.loader_tags import ExtendsNode, ConstantIncludeNode
from pages import settings
def get_request_mock():
@@ -70,6 +70,9 @@
for node in nodelist:
if isinstance(node, ExtendsNode):
placeholders_recursif(node.get_parent(Context()).nodelist,
plist)
+ elif isinstance(node, ConstantIncludeNode):
+ placeholders_recursif(node.template.nodelist, plist)
+
class AutoRenderHttpError(Exception):
"""cannot return context dictionary because a view returned an HTTP
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---