from gluon.template import render def index(): return render(....)
look at the source code of that function it has lots of options. On Sep 16, 11:47 am, JC11 <john.c...@gmail.com> wrote: > Is it possible to call response.render(view, vars) in a controller, > but have the view not a file, but as a string ? > > The reason I want to do this is that I am getting the view from a > database table and replacing bits of it with python code snippets > {{some code}} which response.render will evaluate. > > The other way to do this would be to pass python snippets {{...}} into > the view as vars, but they don't seem to get evaluated. > > The documentation says: > 'response.render(view, vars): a method used to call the view > explicitly inside the controller. view is an optional parameter which > is the name of the view file.' > > Thanks, > > JC