Logically there is a difference.

db.table.field.represent tells web2py how to represent the value of a
field (it assumes there is a value)
db.table.field.requires tells web2py what kind of values can be in a
field and therefore "suggests" a possible representation for the input
widget associated to it.

You can set them to be the same but they are not always the same.

On Jan 2, 7:31 am, Miguel Lopes <[email protected]> wrote:
> On Thu, Dec 31, 2009 at 3:57 PM, mdipierro <[email protected]> wrote:
> > Before
>
> > db.oppty_main.origin_account_id.writable=False
>
> > insert
>
> > db.oppty_main.origin_account_id.represent=lambda id: SPAN(db.account
> > [id].name)
>
> Others my think differently, but I feel that the expected behavior
> would be for the representation set in the requirement to be honored
> all the way.
> Txs for the solution.
> Miguel

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to