Model
db.define_table('t_plasmids',
Field('f_protein', type='string', comment="50 characters max",
label=T('Protein')),
Field('f_plasmid_name', type='string', comment="100 characters max",
label=T('Plasmid Name')),
migrate = True)
db.define_table('t_plasmids_details',
Field('f_plasmid_id',db.t_plasmids),
Field('f_genbankid', type='string', comment="50 characters max",
label=T('GenBankID')),
Field('f_protein_function', type='string', comment="50 characters max",
label=T('Protein Function')),
migrate = True)
-----------------------
Controller
def plasmids():
query=(
db.t_plasmids.id>0)
records=SQLFORM.grid(query=query,maxtextlength = 100,create=create, deletable=delete, \
links = [lambda row: A('ADD details for plasmid id = ',_href=URL("default","show_plasmid_details",args=['new','t_plasmids_details']))], \
links_in_grid=True, \
user_signature=False)
return dict(records=records)
-------------------------
in the view i would like click on "show_plasmid_details", and have the default value f_plasmid_id set with the default value
row.idIs it possible
Thank you very much