Re: [web2py] Re: many to many fields representation

2015-08-23 Thread Itamar Cohen
Thanks for the info. Best Regards Itamar Cohen Picatek Ahornvej 27 DK-7700 Thisted Denmark www.picatek.dk i...@picatek.dk T: +45 97 91 07 82 M:+45 29 89 07 82 On 22 August 2015 at 20:19, Anthony wrote: > Yes, I forgot to mention, the dropdowns in the forms are based in the > IS_IN_DB validator

Re: [web2py] Re: many to many fields representation

2015-08-22 Thread Anthony
Yes, I forgot to mention, the dropdowns in the forms are based in the IS_IN_DB validator attached to each field. So, you will also have to overwrite the "requires" attribute of these two fields with a custom IS_IN_BD validator. Anthony -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: many to many fields representation

2015-08-22 Thread Itamar Cohen
Thanks Anthony, It works (both solutions) in the grid but not in the edit/new forms you get when clicking on the auth_memebership link in the grid (the id still appended to the name/role. May be it is OK as you mentioned regarding uniqueness. Best Regards Itamar Cohen Picatek Ahornvej 27 DK-7700 T

[web2py] Re: many to many fields representation

2015-08-22 Thread Anthony
By default, the "represent" attribute of a reference field is based on the "format" attribute of the table it references. So, you have two options -- you could either change the "format" attributes of the auth_user and auth_group tables: db.auth_user._format = '%(first_name)s %(last_name)s' #