inheritance using non-file based templates

15 views
Skip to first unread message

chris.vickerson

unread,
Jan 27, 2009, 8:52:31 PM1/27/09
to Mako Templates for Python
Can someone point to an example of how to achieve template inheritance
using strings? I have a restriction that the templates must be stored
in a database and not a file system.

Much appreciate any guidance on this.

Chris V.

Michael Bayer

unread,
Jan 27, 2009, 8:59:18 PM1/27/09
to mako-d...@googlegroups.com
a TemplateLookup collection needs to be involved for templates to
access each other. any template can be associated with a lookup
using either the "lookup=some_lookup" keyword argument sent to
Template, or by creating the Template strings directly with the lookup
using lookup.put("some template name", "your template").
Reply all
Reply to author
Forward
0 new messages