If I have:
#model
db.define_table('mytable',
...
Field('other_table_id','reference
other_table',default=request.args(0),...),
...
)
It works fine on the webpage (Views) and SQLFORM, but when I try to
access the database from appadmin, it runs into an error:
>> ValueError: invalid literal for int() with base 10: 'db'
because the first item is "db" and it's not an integer.
Normally we will put:
>> Field('other_table_id','reference other_table',default=db.other_table.id,...)
which will load fine, but on the webpage (Views), "None" comes up,
which is not desirable.
The only way I can think up is to use Try...Except... but syntax
errors come up.
How will you resolve this?
Thanks!