I've run into a situation where I have some application code in a .mako file as a 'def' statement. this file&function is used by several other templates.
i've come into the situation where I now also need to render this def directly. i can handle that in the Mako API itself using something like content = Template('/path/to/file').get_def('foo').render( bar ) unfortunately, with this approach I won;t have all the environment settings and configurations from Pyramid that I want. it's also a bit of a pain trying to pull out the mako settings. i thought about passing a mako template as a string to pyramid.renderers.render() , but that's not supported. right now, i think my only way is to create a file that simply wraps an include and call to my file. this seems annoying and confusing for maintenance. anyone have an idea on possible solutions ? -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/d/optout.