How are you exporting the data? The export_to_csv_file() method, for 
example, takes a "represent" argument -- if set to True, it will use each 
field's "represent" attribute to convert the values before exporting.

Anthony

On Tuesday, July 24, 2012 9:59:15 AM UTC-4, joe wrote:
>
> Hello
>
> I am working with xlwt and trying to export a table of mine into a .xls 
> file.  This table contains some foreign keys, and they are being exported 
> as the id of the other table rathan than the 'name' field, which is what I 
> want to display.  I define the foreign key fields in the table like this:
>
>
> Field('owner', db.person, requires = IS_EMPTY_OR(IS_IN_DB(db, db.person, 
> '%(name)s')), represent=lambda id, row: db.person(id).name if id else ' '),
>
> Thanks!
>

-- 



Reply via email to