In theory it should work but you can get the same effect with format,
try:
db.define_table('adres',
Field('straat'),
format='%(straat)s' )
and remove the represent.
On Feb 12, 10:04 am, Johann Spies <[email protected]> wrote:
> I get the following output :
>
> inwoner.idinwoner.vaninwoner.adres1Spies1
> the following code:
>
> db.define_table('adres',
> Field('straat'))
>
> db.define_table('inwoner',
> Field('van'),
> Field('adres', db.adres,
> requires = IS_IN_DB(db,'adres.id')))
>
> db.inwoner.adres.represent = lambda id: db.adres(id).straat
>
> Why does represent not represent inwoner.adres as 'straat' from 'adres?
>
> Regards
> Johann
> --
> May grace and peace be yours in abundance through the full knowledge of God
> and of Jesus our Lord! His divine power has given us everything we need for
> life and godliness through the full knowledge of the one who called us by
> his own glory and excellence.
> 2 Pet. 1:2b,3a