Use

db.mytable.id.represent = your represent

search book for proper syntax with "reprensent" keyword.

Richard

On Tue, Feb 14, 2012 at 3:04 PM, monotasker <[email protected]> wrote:

> I haven't been able to figure this out: I want to use the "format"
> representation defined in my db model to represent the rows in a list of
> query results. In other words, I'd like to be able to do something like
> this:
>
> rowlist = []
> q = db(db.mytable.id > 0).select()
> for r in q:
>     rowlist.append(r._format)
>
> But, of course, r._format doesn't give me the formatted representation of
> the row. (It seems to be a property of the db.tables[x] object, but not not
> a property of the rows object produced by the query.)
>
> Thanks,
>
> Ian
>

Reply via email to