Please help me to understand why the following code works (the link works
without a problem) but not if I enable the view/edit/delete buttons?
fields = [db.sabinet_l1_journal.title,
db.sabinet_l1_journal.issn,
db.sabinet_l1_journal.eissn,
db.l1_sabinet_jnl_type.jnl_type
]
links = [dict(header = "Journal Type",body = lambda row: A('edit'
,#_target = "_blank",
_href = URL('sabinet',
'classify_sabinet_l1_journals',
args = [row.sabinet_l1_journal.id],
user_signature=True)))]
data = SQLFORM.grid(db.sabinet_l1_journal.id > 0,
fields = fields,
links=links,
details = False,
deletable = False,
editable = False,
left=db.l1_sabinet_jnl_type.on(
db.sabinet_l1_journal.jnl_id ==
db.l1_sabinet_jnl_type.jnl_id),
maxtextlength=120,
)
When I enable the details button and click on it, it complains about the
line in the links part of the code above:
args = [row.sabinet_l1_journal.id],
AttributeError: 'Row' object has no attribute 'sabinet_l1_journal'
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
--
---
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].
For more options, visit https://groups.google.com/groups/opt_out.