a, u right, sorry, my bad, thanks for the correction, anthony.
best regards,
stifan
--
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 mes
On Monday, November 28, 2016 at 6:47:21 PM UTC-5, 黄祥 wrote:
>
> pls try (not tested) :
> def grid_constraints():
> table = db.test
> query = table.created_by == auth.user_id
> constraints = dict(test = query)
> editable = True if query else False
>
No, that won't work -- "query" is a Query object,
pls try (not tested) :
def grid_constraints():
table = db.test
query = table.created_by == auth.user_id
constraints = dict(test = query)
editable = True if query else False
#editable = True
grid = SQLFORM.smartgrid(table, constraints = constraints,
editable = editable)
return locals()
ref:
http://
3 matches
Mail list logo