Hhhhhhmmmm ... if I run the snippet you've distilled from my code as a python script then it works for me as well. Thanks - had actually never tried that but should have.
However, if I embed it into CherryPy (which is really what I ultimately need to do) then I get this:
e = sys.exc_info()[0]
_render_error(template, context, e)
else:
callable_(context, *args, **kwargs)
def _render_error(template, context, error):
if template.error_handler:
result = template.error_handler(context, error)
if not result:
/Library/Python/2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/runtime.py, line 824:
callable_(context, *args, **kwargs)
/Library/Python/2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/runtime.py, line 798:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
/Library/Python/2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/runtime.py, line 766:
**_kwargs_for_callable(callable_, data))
/Library/Python/2.7/site-packages/Mako-0.7.2-py2.7.egg/mako/template.py, line 412:
return runtime._render(self, self.callable_, args, data)
./test-sqlobject.py, line 36:
return index_tmpl.render(contacts)
You see in the last line how I'm invoking the index template. It gets created from index.tmpl as you expect.
Any ideas?
And thanks again,
Fritz