I just realized template plugins are leaving out something I'd consider fairly important: rendering plain strings. Now only modules names are supported (hopefully with filenames to come).

I propose this is handled by adding another keyword argument to render(), template_string. This can be combined with other arguments, but then those arguments become suggestive for error messages. E.g., if you pass "template" and "template_string", then "template" is used for the template name in error messages (if applicable), but only template_string is actually used for rendering.

I'd also propose template_filename be another argument to the render method. If that argument is a relative filename, you should search the template path for the file (you shouldn't resolve relative to the current directory -- if you want that you should use os.path.abspath() on the filename before passing it to .render()).

--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org

Reply via email to