Dear Massimo; Dont worry , after this project done , (in 2 weeks) i will release web2py OS too. I had made a VM to use for this project , its with web2py and sliming it down , i can present you people with first release of web2py-vm. I will also need community help to make it evolve!.
Regards, Phyo. On Wed, Jan 7, 2009 at 10:02 AM, annet <jmverm...@planet.nl> wrote: > > Massimo, > > I added two lookup table to my application: > > db=SQLDB('sqlite://annet.db') > > db.define_table('shape', > SQLField('name'), > migrate='shape.table') > > db.define_table('color', > SQLField('name'), > migrate='color.table') > > db.define_table('shapecolor', > SQLField('shapename'), > SQLField('colorname'), > migrate='shapecolor.table') > > db.shapecolor.shapename.requires=IS_IN_DB(db,db.shape.name,'%(name)s') > db.shapecolor.colorname.requires=IS_IN_DB(db,db.color.name,'%(name)s') > > db.shapecolor.colorname.requires=IS_NOT_IN_DB(db > (db.shapecolor.shapename==request.vars.shapename),'shapecolor.colorname') > > > Doing so raised the following problem: when I comment out the last > validator, I have two drop boxes in the admin from which I can choose > a shape and a color and insert them into the database. However, when I > uncomment the two column unique constraint, the color drop box breaks, > it becomes a text field. When I insert a shape and color combination > that's already in the database I get an error, so the constraint > works, but loosing the drop box functionality on color is rather > awkward. > > 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 web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---