Hello ,
i have 2 tables like this :
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.id
Is it possible
Thank you very much
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/18652577-c1bf-4f62-9436-39e66326bc5cn%40googlegroups.com.