Hi,
Yielding rendered templates without transforming them to str objects
first seems not to work. Example:
====================
code.py
====================
import web
urls = (
'/(.*)', 'hello'
)
app = web.application(urls, globals())
render = web.template.render("templates/")
class hello:
def GET(self, name):
yield "Inline str literal.\n"
yield str(render.tostr())
yield render.direct()
yield "The end."
if __name__ == "__main__":
app.run()
====================
templates/tostr.txt
====================
Template object passed through str().
====================
templates/direct.txt
====================
Directly yielded rendered template object.
====================
Output:
====================
Inline str literal.
Template object passed through str().
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---