Thank you, that was the solution I've seached for.

On 2 Jun, 13:21, "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>

Reply via email to