I am needing to use a template as a string, so I can send it as an email from within my application.
The web.py docs show how to do this:
template = "$def with (name)\nHello $name"
hello = web.template.Template(template)
print hello('world')
But I need to use the round() function, which is not supported within the template. I was able to successfully pass this as a global when rendering the html in a browser, but I have been able to figure out how to do it with the template as a string.
Any ideas?
Thanks.