[web2py] Re: Passing the same object with response from every controller function automatically

2011-12-22 Thread apple
You can put in your model: response.anythingyoulike=something Then in your view {{=response.anythingyoulike}} On Dec 22, 1:12 pm, greenguerilla johngerardoconn...@gmail.com wrote: Hi, I have a search form which I wish to appear on every page. I would rather define this programatically than

[web2py] Re: Passing the same object with response from every controller function automatically

2011-12-22 Thread Anthony
If you define it in a model file, it will be available in all views. You could also define it in its own view file and then include that view file in either your layout.html or in your individual views for specific actions. Anthony On Thursday, December 22, 2011 8:12:50 AM UTC-5, greenguerilla

[web2py] Re: Passing the same object with response from every controller function automatically

2011-12-22 Thread Anthony
On Thursday, December 22, 2011 8:31:11 AM UTC-5, apple wrote: You can put in your model: response.anythingyoulike=something Then in your view {{=response.anythingyoulike}} Note, it doesn't necessarily have to be added to the response object. In a model, you could just do:

[web2py] Re: Passing the same object with response from every controller function automatically

2011-12-22 Thread greenguerilla
Awesome. Thanks guys, this was exactly what I was looking for. On Dec 22, 1:39 pm, Anthony abasta...@gmail.com wrote: On Thursday, December 22, 2011 8:31:11 AM UTC-5, apple wrote: You can put in your model: response.anythingyoulike=something Then in your view