Re: [web2py] How do Global Variables Work?

2012-01-05 Thread Anthony
> > However, what's the purpose of global variables? I thought this conflicts > with one of the examples in the Introduction chapter. > Which example?

Re: [web2py] How do Global Variables Work?

2012-01-05 Thread Peter O
I understand explicitly passing the variable will do the work. However, what's the purpose of global variables? I thought this conflicts with one of the examples in the Introduction chapter. Secondly, I don't understand the different results between Example 1 and 2. Something deeper is happenin

Re: [web2py] How do Global Variables Work?

2012-01-05 Thread Bruno Rocha
you need to pass it return dict(t1=t1) or return locals() http://zerp.ly/rochacbruno Em 05/01/2012 12:03, "Peter O" escreveu: > Hihi, > > I am baffled by what I see between Example 1 and 2. > > It may be a good case to improve my understanding of the run-time > environment of web2py. > > Than

[web2py] How do Global Variables Work?

2012-01-05 Thread Peter O
Hihi, I am baffled by what I see between Example 1 and 2. It may be a good case to improve my understanding of the run-time environment of web2py. Thanks in advance for any comments. VIEW: (test.html) {{=globals().get('t1', False)}} CONTROLLER: == Example 1 == def test(): global