[web2py] Re: simple db app

2010-12-13 Thread Rick Hultgren
http://groups.google.com/group/web2py/browse_thread/thread/b7cd19c53648ef0d On 12/14/10, Rick wrote: > Hi, > > I'm trying to make a data base for storing names and addresses, but > since I'm a n00b then I can't get it working. I've no idea what's > wrong. The problem is that the input function do

Re: [web2py] Re: Initiating table

2010-07-07 Thread Rick Hultgren
efine "fields" . Perhaps I should import the ctype library? On 7/6/10, Rick Hultgren wrote: > ooops... this should be the correct code: > > letters=['A', 'B', 'C'] > fields=[] > for letter in letters: > db.define_table(letter, *fi

Re: [web2py] Re: Initiating table

2010-07-06 Thread Rick Hultgren
ooops... this should be the correct code: letters=['A', 'B', 'C'] fields=[] for letter in letters: db.define_table(letter, *fields) fields=[Field(item+'_id', db[item]) for item in letters] ...sorry for the bad code int the previous message. On 7/6

Re: [web2py] Re: Initiating table

2010-07-06 Thread Rick Hultgren
(item) for item in letters] Thanks a lot for the help! On 7/4/10, mdipierro wrote: > No. > > Given db.define_table('sometable',*fields), you cannot add fields > outside this statement but you can call the statement in a separate > http request and add fields to the *fi

Re: [web2py] Re: Initiating table

2010-07-04 Thread Rick Hultgren
...with other words -- how to add fields to a table that is already declared? Is it possible? On 7/4/10, Rick Hultgren wrote: > perhaps the table names will be changed, so please don't bother about > "before" and "after"...the point is -- how to refer/link to the

Re: [web2py] Re: Initiating table

2010-07-04 Thread Rick Hultgren
perhaps the table names will be changed, so please don't bother about "before" and "after"...the point is -- how to refer/link to the table name "locus", when that table is not yet created/declared/made? On 7/4/10, Rick Hultgren wrote: > Thanks for the answ

Re: [web2py] Re: Initiating table

2010-07-04 Thread Rick Hultgren
) db.define_table( 'locus', Field( 'substance', db.substance), Field( 'process', db.process), Field( 'condition', db.condition), Field( 'locus', db.locus), Field( 'name'), Field( 'main_name')) On 7/4/10, mdipierro wrote: >

Re: [web2py] Re: Initiating table

2010-07-03 Thread Rick Hultgren
Thanks for the link. My actual problem is more complicated than the example I gave. I realize that I need to link a field to a table that isn't initiated yet (item2): objects = ['substance', 'process', 'condition', 'locus'] linksubobjects = ['locus', 'before', 'after'] unli