[web2py] many to many fields representation

2015-08-22 Thread icodk
I made a form for editing the auth_membership table using smart grid, it works fine. The only issue I have is that the id of the user_id and the id of the group_id are appended to the user name and to the group name. How can I get rid of this 'extra' addition ? For example the user John Smith

[web2py] Many to many to many?

2015-08-22 Thread Gael Princivalle
Hello. I've make a many to many to many relationship but I've got problems on select results. Is it the correct way to do it? My DB: db.define_table('ceo_schemes', Field('name', type='string', requires=IS_NOT_EMPTY()), format='%(name)s')

[web2py] Re: SQLFORM.grid shows ids instead of names only in Linux

2015-08-22 Thread Massimo Di Pierro
please try and let us know. On Friday, 21 August 2015 16:31:25 UTC-5, Antonio Salazar wrote: The web2py versions are different The working one (development) is 2.11.2-stable+timestamp.2015.05.30.16.33.24 The non-working one (production) is 2.10.3-stable+timestamp.2015.04.02.21.42.07 I

[web2py] Re: Unable to install HandsOnTable plugin

2015-08-22 Thread Massimo Di Pierro
that plugin is a little old and hands on table is evolved since. Using hands on table does not really require the plugin, it is very easy to use, and it purely client side. On Friday, 21 August 2015 18:34:27 UTC-5, Dave S wrote: On Thursday, August 20, 2015 at 10:17:59 PM UTC-7, Martti

[web2py] Re: GAE: BadRequestError: projection and keys_only cannot both be set

2015-08-22 Thread Massimo Di Pierro
Can you please open a pydal issue about this? On Friday, 21 August 2015 18:44:02 UTC-5, Jaime Sempere wrote: Hi, Im using web2py 2.9.12, Im developing on local gae, and when I tried to execute this query: pics = db(db.pics.user_id==user_id).select(db.pics.img_link, projection=True

[web2py] Re: Can web2py have a microframework the way Laravel has Lumen?

2015-08-22 Thread Massimo Di Pierro
Giovanni (weppy developer) and the web2py community are already cooperating since he is the leading force behind pydal and de fact maintainer of pydal. I have not looked at the code recently but I trust Giovanni's skills completely and from what I have seen, I am sure it is excellent. It is a

[web2py] Re: Any problem in list:reference in 2.10 ?

2015-08-22 Thread Massimo Di Pierro
2.12.3 is out. Can you please check that? On Saturday, 22 August 2015 18:58:26 UTC-5, Stefan van den Eertwegh wrote: Massimo, I have updated my web2py to 2.12.2 and still have this problem with a list:reference table Is this something you still have to fix in the web2py version?

[web2py] IS_IN_DB table in other database

2015-08-22 Thread Anthony
Did you try it and have a problem? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google

[web2py] Re: GAE: BadRequestError: projection and keys_only cannot both be set

2015-08-22 Thread Jaime Sempere
Done! El domingo, 23 de agosto de 2015, 2:10:27 (UTC+2), Massimo Di Pierro escribió: Can you please open a pydal issue about this? On Friday, 21 August 2015 18:44:02 UTC-5, Jaime Sempere wrote: Hi, Im using web2py 2.9.12, Im developing on local gae, and when I tried to execute this

[web2py] Re: Any problem in list:reference in 2.10 ?

2015-08-22 Thread Stefan van den Eertwegh
Massimo, I have updated my web2py to 2.12.2 and still have this problem with a list:reference table Is this something you still have to fix in the web2py version? Greetings, Stefan van den Eertwegh Op dinsdag 28 april 2015 21:26:23 UTC+2 schreef Ariya Owam-aram: Hi Everyone, I just upgrade

[web2py] Q: I am making an sqlform widget with jquery sortable, to change the order of a list

2015-08-22 Thread kk
Hi, I am making an sqlform widget that can change the order of a list, for example, if I have a field with value xx = [a,b,c], user can interact with this ui to make it xx = [c, a, b]. To achieve this, I need to post a list. If I use SELECT, it is easy, but you cannot change the order of

[web2py] Re: Many to many to many?

2015-08-22 Thread Massimo Di Pierro
Should'd that be override_code = override[k].ceo_schemes_and_overrides_and_override_codes. override_code.code1 anyway this should be faster (no nested queries) override = db((db.ceo_schemes_and_overrides_and_override_codes.ceo_scheme == ceo_scheme.id)

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

[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' #

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

[web2py] IS_IN_DB table in other database

2015-08-22 Thread Annet
I wonder whether it is possible to move my standardization table from db to db_s and have the following validator: db.define_table('lct_address', Field('locality', requires=[IS_EMPTY_OR(IS_IN_DB(db_s, 'lct_locality.name', '%(name)s'))]), ) Kind regards, Annet --