There are two new features in trunk. One will probably stay, the other
I do not know:

1) Before you could do

    db.define_table('person',Field('name'),format='%(name)s')
    db.define_table('dog',Field('name'),Field('owner',db.dog))

now you can also have things like

    format=lambda person: person.name.capitalize()

or any other function of a person to represent it.

2) You can have

    db.dog.owner.requires=IS_IN_DB(db,db.person,'%(names)s',
                                         _and=IS_NOT_IN_DB
(db,db.dog.owner))

The novelty is in the _and.

The problem is that the exclusion is only used in validation, not when
creating the dropdown for IS_IN_DB. The reason is not is that it would
require looking two tables (the referee and the refrences). This could
be done with a JOIN in RDBs but it could not be done efficiently in
NoDBs

Any advice is appreciated.



-- 
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