use db.define_table("devices_membership", Field("devices_config_id", "reference devices_config"), Field("auth_group_id", "reference auth_group") )
that is the recommended way to specify references. you don't need to specify the "integer" type, because a) any reference type (other than str pkeys) is an integer b) you loose the default validator applied to reference fields, that is a IS_IN_DB() that gets a dropdown in the html representation On Wednesday, August 7, 2013 10:42:06 AM UTC+2, Jayakumar Bellie wrote: > > Hi, > I have created a "device_config" table and wanted to create a many to many > relationship between the "device_config" and "auth_group" > > db.define_table("devices_membership", > Field("devices_config_id", "integer", db.devices_config), > Field("auth_group_id", "integer", db.auth_group)) > > I am looking for something like > > > http://www.web2pyslices.com/slice/show/1542/manage-users-and-memebership-in-the-same-form > > But when I give a "devices_config" table I am getting a text box rather > than drop down with table details. > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.