oh btw
the image part should look like:
{{=IMG(_src=URL(r=request, c='default', f='download',
args=[record.x]))}}
On Jun 2, 2:21 pm, "hamdy.a.farag" <[email protected]> wrote:
> assuming you've
>
> def index():
> form = SQLFORM(db.tab)
> if form.accepts(request.vars, session):
> response.flash = 'x'
> records = db().select(db.tab.ALL)
> return dict(form=form, records=records)
>
> then in view you can do something like:
>
> {{extend 'layout.html'}}
>
> {{=form}}
>
> <table>
> <tr>
> <th>name</th>
> <th>image</th>
> </tr>
>
> {{for record in records:}}
> {{filename, file = db.tab.x.retrieve(record.x)}}
> <tr>
> <td>
> {{=filename}}
> </td>
> <td>
>
> image goes here
> </td>
> </tr>
> {{pass}}
> </table>