Massimo,
I don't get the two column unique constraint in my application to
work. Therefore I created the following table:
db=SQLDB('sqlite://annet.db')
db.define_table('shape',
SQLField('name'),
SQLField('color'),
migrate='shape.table')
db.shape.name.requires=IS_NOT_IN_DB(db
(db.shape.name==request.shape),'shape.color')
The IS_NOT_IN_DB validator should prevent the user from entering two
shapes with the same color, I inserted the following shapes and
colors:
triangle red
cone green
when I enter a second green cone, the application doesn't protest and
inserts a second green cone. How do I get this simple application to
work properly.
Best regards,
Annet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" 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
-~----------~----~----~----~------~----~------~--~---