Awesome! I think this may stem from an earlier discussion we had on the IS_IN_DB and my 'noob request for a many-to-many? You rock Massimo.
On Dec 31 2008, 7:57 am, mdipierro <[email protected]> wrote: > BTW... it works great with this jquery plugin: > > http://lab.arc90.com/tools/jquery_multiselect/ > > On Dec 30, 5:37 pm, mdipierro <[email protected]> wrote: > > > New in trunk. Please give this a try: > > > db=SQLDB('sqlite://storage.db') > > db.define_table('person',SQLField('name')) > > db.define_table('dog',SQLField('name'),SQLField('person','text')) > > db.dog.person.requires=IS_IN_DB > > (db,'person.id','person.name',multiple=True) > > > This is not the same many2many as Django and Rails do it (because does > > not use an intermediate table) but for practical purposes it works the > > same, if not better, and works on GAE too. It will possible to change > > the widget to make it look different. > > > The trick is to turn a reference into a 'text' field and set the > > IS_IN_DB or IS_IN_SET validator to multiple=True. > > > If you like it and if nothing breaks, this will go in 1.55. > > > Mind that I had to make quite a lot of changes to make this work > > seamlessly. > > > Massimo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

