[web2py] Re: get variables in view from other controller

2011-03-20 Thread Anthony
On Sunday, March 20, 2011 3:05:04 AM UTC-4, LightOfMooN wrote: > > It's that I need, with using [0][0] > Can you explain that are it means? > Does web2py return html like set of helpers? > is [0][0] the first container's content of returned set (first div's > content)? It looks like LOAD re

[web2py] Re: get variables in view from other controller

2011-03-20 Thread LightOfMooN
It's that I need, with using [0][0] Can you explain that are it means? Does web2py return html like set of helpers? is [0][0] the first container's content of returned set (first div's content)? On 20 мар, 10:32, Anthony wrote: > On Saturday, March 19, 2011 5:18:23 PM UTC-4, LightOfMooN wrote: >

[web2py] Re: get variables in view from other controller

2011-03-19 Thread Anthony
On Saturday, March 19, 2011 5:18:23 PM UTC-4, LightOfMooN wrote: > > no, it doesn't be a controller. > But I can not use ajax too, because I need variables in template, but > not the rendered block. > (and I don't like that LOAD() loads components in new div, because it > may cause a problems

[web2py] Re: get variables in view from other controller

2011-03-19 Thread pbreit
You can drop it anywhere in the models directory. In fact, you could have a utils.py file in models.

[web2py] Re: get variables in view from other controller

2011-03-19 Thread LightOfMooN
no, it doesn't be a controller. But I can not use ajax too, because I need variables in template, but not the rendered block. (and I don't like that LOAD() loads components in new div, because it may cause a problems with css and jquery) So, I think, a one good way is to define some function in db.

[web2py] Re: get variables in view from other controller

2011-03-19 Thread pbreit
You can set Ajax=False in LOAD(). Does the source function need to be a controller? If not, can you put it in a model or elsewhere?

[web2py] Re: get variables in view from other controller

2011-03-19 Thread Anthony
You're probably better off with LOAD, but if you don't want to use Ajax, maybe exec_environment would work: http://web2py.com/book/default/chapter/04#Execution-Environment Does options() have to be a controller action (i.e., does it ever need to be called via a URL)? If not, you could also sim

[web2py] Re: get variables in view from other controller

2011-03-19 Thread LightOfMooN
Yes, I know it. I very like bluebream because of pull (it's not for propagation :) And it's too hard for me to develop without it, but I try. So, maybe is there a way to prepare some variables in some function and then use it by calling prepare-function from needed function? Something like: myco

[web2py] Re: get variables in view from other controller

2011-03-19 Thread Massimo Di Pierro
There are two types of frameworks: push and pull. In push once controller pushes variables to one view. In pull one view pulls variables from multiple controllers. Web2py, Django, TG, Pylons, Pyramid, Flask, are push frameworks. You are trying to use a push framework as a pull one and that is no