Re: [web2py] another funtion in view

2010-12-23 Thread Arun K.Rajeevan
Is it that, you need the view index.html to render the results from both view and index controller? In that case, within index.html use ajax LOAD function to get content of view.html. here, view.html doesn't have to extend layout.html.

Re: [web2py] another funtion in view

2010-12-21 Thread Jonathan Lundell
On Dec 21, 2010, at 3:31 AM, Sahil Arora wrote: > > no , i know this. > But i want to use a function say view( ) as well as index( ) in index.html. > I want to use the output of view( ) in index.html Martin has the right idea, I think. Factor out the common logic and call it from view() and inde

Re: [web2py] another funtion in view

2010-12-21 Thread Martín Mulone
I dont understand what do you want to achieve if view is a function declared in models and call it (ex: func_view), and return data in 'controllers/default.py' def view(): response.view='default/index.html' mydata = func_view() return dict(mydata=mydata) def index(): response.view='d

Re: [web2py] another funtion in view

2010-12-21 Thread Sahil Arora
no , i know this. But i want to use a function say view( ) as well as index( ) in index.html. I want to use the output of view( ) in index.html On 12/21/10, Martín Mulone wrote: > If you want to use the same view/default/index.html in other controller? > > example: in controller/default.py > > de

Re: [web2py] another funtion in view

2010-12-21 Thread Martín Mulone
If you want to use the same view/default/index.html in other controller? example: in controller/default.py def another(): response.view='default/index.html' 2010/12/21 Sahil Arora : > I want to use a function in index.html other than index(). Where I > should define ? -- My blog: http://

[web2py] another funtion in view

2010-12-21 Thread Sahil Arora
I want to use a function in index.html other than index(). Where I should define ?