Hi!

I really can't get this done, please, any help is welcome.

Consider that I have this tables:

##### models/db.py #####

db.define_table('auth_user' ... )

db.define_table('estados_postulacion',
Field('nombre'),
Field('descripcion'),
format='[%(id)s] %(nombre)s')

db.define_table('postulaciones',
Field('proceso_postulacion', db.proceso_postulacion),
Field('postulante', db.auth_user, default=user_id),
Field('fecha_postulacion', 'datetime', default=request.now),
Field('estado_postulacion', requires=IS_IN_DB(db, 'estados_postulacion.id', 
'%(nombre)s'),
          represent=lambda r:db.estados_postulacion[r].nombre))

###############

The "represent" attribute defined there only work for SQLTABLE but I don't 
need a table in my view.

How I can to define a represent in a controller for the field: 
db.postulaciones.estado_postulacion ?

I need that this represent work in my view:
represent=lambda r:db.estados_postulacion[r].nombre


Thanks a lot!

Reply via email to