Re: [web2py] Import models data to modules

2013-01-03 Thread Massimo Di Pierro
Yes but in model from gluon import current print current.myvar # never use correct at top-levet On Thursday, 3 January 2013 09:58:54 UTC-6, rochacbruno wrote: > > in models: > > myvar = 1 > > from gluon import current > current.myvar = myvar > > On a module > > from gluon import current > > prin

Re: [web2py] Import models data to modules

2013-01-03 Thread Daniel Correia
Thanks for replying! It works! On Thursday, 3 January 2013 15:58:54 UTC, rochacbruno wrote: > > in models: > > myvar = 1 > > from gluon import current > current.myvar = myvar > > On a module > > from gluon import current > > print current.myvar > > On Thu, Jan 3, 2013 at 10:54 AM, Daniel Correia

Re: [web2py] Import models data to modules

2013-01-03 Thread Bruno Rocha
in models: myvar = 1 from gluon import current current.myvar = myvar On a module from gluon import current print current.myvar On Thu, Jan 3, 2013 at 10:54 AM, Daniel Correia wrote: > > Hello! > > I have some variables in models which I'd like to import to the modules. > How to do it? > > --

[web2py] Import models data to modules

2013-01-03 Thread Daniel Correia
Hello! I have some variables in models which I'd like to import to the modules. How to do it? --