a | b | |
---|
| 0 | + | ====== body.mako |
---|
| 0 | + | this is a test: |
---|
| 0 | + | |
---|
| 0 | + | % for node in doctree.children[1:]: |
---|
| 0 | + | ${node.tagname} |
---|
| 0 | + | <%include file="${node.tagname}.mako"/> |
---|
| 0 | + | % endfor |
---|
| 0 | + | |
---|
| 0 | + | ====== docinfo.mako |
---|
| 0 | + | ${node.tagname} |
---|
| 0 | + | |
---|
| 0 | + | |
---|
| 0 | + | ====== output |
---|
| 0 | + | Traceback (most recent call last): |
---|
| 0 | + | File "generate.py", line 423, in <module> |
---|
| 0 | + | generate() |
---|
| 0 | + | File "generate.py", line 349, in generate |
---|
| 0 | + | print template.render(doctree=doctree) |
---|
| 0 | + | File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/template.py", line 412, in render |
---|
| 0 | + | return runtime._render(self, self.callable_, args, data) |
---|
| 0 | + | File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 766, in _render |
---|
| 0 | + | **_kwargs_for_callable(callable_, data)) |
---|
| 0 | + | File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 798, in _render_context |
---|
| 0 | + | _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) |
---|
| 0 | + | File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 824, in _exec_template |
---|
| 0 | + | callable_(context, *args, **kwargs) |
---|
| 0 | + | File "body_mako", line 29, in render_body |
---|
| 0 | + | File "/home/mathieu/Dropbox/auto_entrepreneur/projets/faitmain/lib/python2.7/site-packages/mako/runtime.py", line 693, in _include_file |
---|
| 0 | + | callable_(ctx, **_kwargs_for_include(callable_, context._data, **kwargs)) |
---|
| 0 | + | File "docinfo_mako", line 21, in render_body |
---|
| 0 | + | AttributeError: 'Undefined' object has no attribute 'tagname' |
---|
... | |
---|