On Saturday, May 6, 2017 at 4:50:47 AM UTC-4, Andrea Fae' wrote:
>
> Solution:
> db.evento.giorno_inizio.represent = lambda giorno_inizio, row: 
> T(giorno_inizio)
>
> But I don't know whhy I have to specify "row" in tha lambda function...
>

The "represent" function must have a particular form, as the framework will 
call it by passing two arguments -- the first argument is the value of the 
field itself, and the second argument is the entire row object. In any 
given case, you may not need one or the other of those arguments, but they 
are both provided for maximum flexibility regarding how you want to 
represent the field (in many cases, you need values of other fields in the 
same record).

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to