[web2py] Re: response.render not using the right view

2016-03-18 Thread Anthony
The problem is you are passing a URL as the first argument to response.render, but it takes the path to a view (it assumes a root path under the application's /views folder, so you only need to give the path from that point). Anthony On Friday, March 18, 2016 at 2:21:31 PM UTC-4, Jacob Thoenne

[web2py] Re: response.render

2010-09-17 Thread JC11
Thanks, :) On Sep 16, 6:04 pm, mdipierro wrote: > 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 wrote: > > > Is it possible to call response.render(view, vars) in a con

[web2py] Re: response.render

2010-09-16 Thread mdipierro
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 wrote: > Is it possible to call response.render(view, vars) in a controller, > but have the view not a file, but as a string ? > > Th

[web2py] Re: response.render without layout [SOLVED]

2010-02-01 Thread villas
Gotcha! I have to put the response.render file in app/views/ and not in app/views/default/ Thanks for clarifying. --D -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe

[web2py] Re: response.render without layout

2010-02-01 Thread mdipierro
I just tried and work well In views/test.html {{=myvar}} In views/default/test2.html {{=outstr}} In controllers/default.py def test2(): # note test2.html does not exist outstr = response.render('test.html',dict(myvar='MyVarTest')) return dict(outstr=outstr) No layout. Just '

[web2py] Re: response.render without layout

2010-02-01 Thread villas
After more experiments, I have encountered some unexpected behaviour. This is what I did: Create: test.html {{=myvar}} def test(): response.render('test.html',dict(myvar='MyVarTest')) return dict() Result ... default/test2: MyVarTest (OK and expected) def test(): outstr = res

[web2py] Re: response.render without layout [SOLVED]

2010-01-30 Thread villas
I believe response.render is the answer after all. I think I had been using a non-existent view! Thanks, D -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this gr

[web2py] Re: response.render without layout

2010-01-30 Thread mdipierro
Please show us the actual code for the action and the view. Massimo On Jan 30, 8:48 am, villas wrote: > How does one retrieve a html view without including the layout? > > e.g.  In my controller: >    outstr = response.render('item.html',dict(myvar=myvar)) > My view item.html is: >   This is my