[web2py] Re: database variable scoping and visibility

2010-08-16 Thread david.waldrop
beautiful. it worked perfectly. Thank you. Again :-) On Aug 16, 2:27 pm, mdipierro wrote: > Here is how I handled in the past. > > In a model file: > > def bydb(name=None): >       if name: session.db_name=name >       else: name=session.db_name >       commdb=DAL(name) >       commdb.define_t

[web2py] Re: database variable scoping and visibility

2010-08-16 Thread mdipierro
Here is how I handled in the past. In a model file: def bydb(name=None): if name: session.db_name=name else: name=session.db_name commdb=DAL(name) commdb.define_table(.) commdb.define_table(.) commdb.define_table(.) return commdb and use it a