[web2py] Re: how to show the edit button conditionally in the smartgird?

2016-10-16 Thread 黄祥
pls try in your controller: has_membership_admin = auth.has_membership('Admin') if 'view' in request.args: editable = has_membership_admin else: editable = lambda row : (row['registration']['status'] != 'Approved') best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: how to show the edit button conditionally in the smartgird?

2016-10-16 Thread Massimo Di Pierro
SQLFORM.grid(, editable=...) editable can be True/False or a function that takes a row and returns True/False for each each row. On Sunday, 16 October 2016 10:42:12 UTC-5, Tom2016 wrote: > > I need to list all the events that were registered by the members, but > only the non-approved