Instead of response.render, you can use gluon.template.render: from gluon.template import render html = render(db.mytable(1).template, context=dict(key1=value1, key2=value2 ))
Note, if the template needs access to web2py globals and objects defined in your models, you can set context=globals(). Anthony On Wednesday, September 9, 2015 at 12:12:46 AM UTC-4, Encompass solutions wrote: > > It seems I have to use response.render with a file location. Is it > possible to use a string response? Sorry haven't tested but I assume it > can't because it's a string to string check. I really I hope to use this in > a new template system I am setting up. It will be pulling the templates > from the database. > I seem to remember this kind of happening with the wiki and working with > contexts. > BR, > Jason Brower > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.