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
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
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
(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
...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
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
)
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:
>
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
8 matches
Mail list logo