Revision 636332626433 () - Diff

Link to this snippet: https://friendpaste.com/48ZT54oyb5HzY3f0Z79GPF
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
====== body.mako
this is a test:

% for node in doctree.children[1:]:
${node.tagname}
<%include file="${node.tagname}.mako"/>
% endfor

====== docinfo.mako
${node.tagname}


====== output
Traceback (most recent call last):
File "generate.py", line 423, in <module>
generate()
File "generate.py", line 349, in generate
print template.render(doctree=doctree)
File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/template.py", line 412, in render
return runtime._render(self, self.callable_, args, data)
File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 766, in _render
**_kwargs_for_callable(callable_, data))
File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 798, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 824, in _exec_template
callable_(context, *args, **kwargs)
File "body_mako", line 29, in render_body
File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 693, in _include_file
callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs))
File "docinfo_mako", line 21, in render_body
AttributeError: 'Undefined' object has no attribute 'tagname'