Simon Cross
unread,Sep 20, 2014, 5:47:18 AM9/20/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gen...@googlegroups.com
Hi Leho
This is a good question (and so is not easily answered :).
Genshi's template including is fairly complicated. Sub-templates can
either be inlined during template compilation (loading) or dynamically
included during generation.
Inlined sub-templates can't be detected after a template is loaded
(because they've already been included).
Dynamically included templates appear as INCLUDE elements in the
template stream, so one could look for those (although that would only
give one a single level of includes).
One trick you can use is to include a tracker object (e.g. a dict,
list or fancy helper object) in your template context and then have
each template record important events in the tracker object. This
isn't ideal for automated tracking, but on the up side one can track
all sorts of meaningful things.
Schiavo
Simon