Hello I have a grid with certain fields.
In a filed there is a name of a pdf file that I have in the folder "static/Etichette". I have a lot of pdf file in this folder and I'd like, when I click this link, to open the related file...
This is the grid
grid = SQLFORM.grid(db.socio, links = [lambda row: A('Etichetta', _href=URL('static/Etichette', args=[row.etichetta]))], details=False, create=False, editable=False, deletable=False, maxtextlength=40)
or
grid = SQLFORM.grid(db.socio, links = [lambda row: A('Etichetta', _href=URL("static/Etichette/%s" % row.etichetta))], details=False, create=False, editable=False, deletable=False, maxtextlength=40)
This is the table
db.define_table('socio',
Field('codice', type='integer', requires=[IS_NOT_EMPTY()]),
Field('cognome', requires=[IS_NOT_EMPTY()]),
Field('nome', requires=[IS_NOT_EMPTY()]),
Field('intestazione', requires=[IS_NOT_EMPTY()]),
Field('dnascita', requires=[IS_NOT_EMPTY()]),
Field('indirizzo', requires=[IS_NOT_EMPTY()]),
Field('cap', requires=[IS_NOT_EMPTY()]),
Field('comune', requires=[IS_NOT_EMPTY()]),
Field('provincia', requires=[IS_NOT_EMPTY()]),
Field('telefono', requires=[IS_NOT_EMPTY()]),
Field('codfisc', requires=[IS_NOT_EMPTY()]),
Field('etichetta'),
auth.signature,singular="Socio",plural="Soci",migrate='socio.table',
format='%(intestazione)s')
How can I do?
I have this error
invalid function (default/static)
Yes...I know that there is something wrong but I don't know in this moment what...