Ok thanks!

I wondering about an other thing :

I have this :

db['table1'].nottableidfield_id.represent=\
    lambda nottableidfield_id: A("%(someotherfield)s"
%db.table1[nottableidfield_id],\

 
_href=URL(r=request,f='read',args='someothertable'+'/'+str(nottableidfield_id)))

And I get

format mapping error...

Why?

Richard



On Fri, Nov 12, 2010 at 11:37 AM, mdipierro <[email protected]> wrote:

> this is not possible (because it is a DAL not an ORM)
>
> You can do:
>
> db.TABLENAME.FIELDNAME.represent=lambda value: value
> for row in db().select(db.TABLENAME.FIELDNAME):
>    print db.TABLENAME.FIELDNAME.represent(row.FIELDNAME)
>
> This would be the closest thing
>
> On Nov 12, 10:27 am, Richard Vézina <[email protected]>
> wrote:
> > Hello,
> >
> > I would know how I can get a print out of my field.represent=lambda
> > something in command line web2py environnement.
> >
> > Hope I am clear.
> >
> > For example if I do
> >
> > print (db().select(db.TABLENAME.FIELDNAME))
> >
> > I get the values of the field. In case I have create a representation of
> the
> > field can I get a print out in the command line environnement (ipython)??
> >
> > Richard
>

Reply via email to