[web2py] Re: links in sqlform.grid

2015-10-05 Thread 黄祥
e.g. def company(): table = db.company links = [dict(header = T('Logo'), body = lambda row: A(IMG(_src = URL('default', 'download', args = row.logo), _width = 100, _height = 100), _href = URL('default', 'download', args = row.logo) ) ) ] grid = SQLFORM.grid(table, links = links) return locals(

[web2py] Re: links in sqlform.grid

2015-10-05 Thread Laurent Lc
Could tou give the good code because it does not run for me and i do not see what's going wrong cheers Le vendredi 20 septembre 2013 20:19:18 UTC+2, 黄祥 a écrit : > > hi, > > i have an table that contain an upload field for store image, i want to > show the image in sqlform grid. i tried to usi

[web2py] Re: links in sqlform.grid

2013-09-20 Thread 黄祥
thank you so much, it works as expected now. 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 message because you a

[web2py] Re: links in sqlform.grid

2013-09-20 Thread Niphlod
taken directly from http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM.grid-and-SQLFORM.smartgrid links is used to display new columns which can be links to other pages. The > links argument must be a list of dict(header='name',body=lambda row: > A(...)) where header is