[web2py] Re: SQLFORM.grid: represent a field with IS_IN_SET validator by its label instead of its value

2018-04-21 Thread xelomac
Thank you Anthony. Works perfectly in a SQLFORM.grid. The values get displayed as expected. But outside of the grid for something like this persons = db(db[table].id == 1).select() person=persons[0][column] the stored values get displayed not its representation. How can I get the representati

[web2py] Re: Web2py locks row at auth_user and web2py_session_* tables and doesn't unlock them

2018-04-21 Thread Lisandro
Ok, I've left it set to True. A quick comment about a couple of tests I did regarding RedisSession (that also has a "with_lock" argument). To the test, I updated web2py locally to version 2.16.1-stable+timestamp.2017.11.14.05.54.25 And then I run my apps using: - RedisSession(..., with_lock=

[web2py] Re: Why web2py server hangs/freeze?

2018-04-21 Thread Alfonso Serra
I have had the exact same problem the server hanged for a minute to get an undescriptive IOError. I have been able to solve it by commenting these lines on one of my models. from gluon.custom_import import track_changes track_changes(True) wasnt using modules anyway. Hope it helps. -- Resou

Re: [web2py] IS_DECIMAL_IN_RANGE

2018-04-21 Thread Richard Vézina
I hear you and I agree about that... I am just supprise that we have no control over rouding of what goes in the database as it is very critical in some use case with weird rounding spec that you could have in academic sometime for instance. At some point I had extend field "length" to 10 places t

Re: [web2py] Re: web2py 2.16.1 is OUT

2018-04-21 Thread Richard Vézina
Can you open an issue? I think it related to this : https://github.com/web2py/web2py/blob/fb4c114d85494ad6d79d69539adaae103d76e5ce/gluon/fileutils.py#L269 Path string that has to be manipulated differently in python 3 Explanation https://www.scivision.co/python-idiomatic-pathlib-use/ On Fri, A

Re: [web2py] Re: web2py 2.16.1 is OUT

2018-04-21 Thread Richard Vézina
Actually I can't reproduced... It could it be a permission error?? Try to clone it fresh some where you have full access with this command : git clone --recursive https://github.com/web2py/web2py.git Then cd web2py python3 web2py.py Enter password Richard On Sat, Apr 21, 2018 at 8:01 AM, Ri

[web2py] Re: SQLFORM.grid: represent a field with IS_IN_SET validator by its label instead of its value

2018-04-21 Thread xelomac
I've found a solution: rows = db(db[table].id == id).select() rendered_row = rows.render(0, fields=[db[table][column]]) value = rendered_row[column] On Saturday, April 21, 2018 at 12:31:49 PM UTC+2, xelomac wrote: > > Thank you Anthony. Works perfectly in a SQLFORM.grid. The values get > display

[web2py] custom header in QLFORM

2018-04-21 Thread Diego Tostes
Hi, this is my code: fields = (db.ensaios.codigo_registro, db.ensaios.patrocinador_primario, db.ensaios.contato_publico, db.ensaios.titulo_en, db.ensaios.trial_info ) headers = {'db.ensaios.codigo_registro': T('Regist

[web2py] Re: self-reference partner autoupdate

2018-04-21 Thread JSalvat
Thanks Anthony, your active support to this group is great! I solved the symmetric self relationship integrity this way: db.define_table('person', Field('name', requires=IS_NOT_EMPTY()), Field('partnet', 'reference person', ondelete='NO ACTION',

[web2py] list:reference and SQLFORM.grid

2018-04-21 Thread Yoel Benitez Fonseca
Is the grid search not working witch list:reference ? for example: db.define_table('thing', Field('name', 'string')) db.define_table('person', Field('name', 'string'), Field('things', 'list:reference thing')) db.person.things.requires = IS_IN_DB(db, 'thing.id', '%(name)s', multiple=True) The

Re: [web2py] IS_DECIMAL_IN_RANGE

2018-04-21 Thread Anthony
On Saturday, April 21, 2018 at 7:53:42 AM UTC-4, Richard wrote: > > I hear you and I agree about that... I am just supprise that we have no > control over rouding of what goes in the database as it is very critical in > some use case with weird rounding spec that you could have in academic > som

[web2py] Re: custom header in QLFORM

2018-04-21 Thread Anthony
> > headers = {'db.ensaios.codigo_registro': T('Register Code'), >'db.ensaios.patrocinador_primario':T('Patrocinador > Primario'), >'db.ensaios.contato_publico':T('Public Contact'), >'db.ensaios.titulo_en':T('English title'), >'d

[web2py] Re: self-reference partner autoupdate

2018-04-21 Thread Anthony
> > It works great, but I still need to *filter *the drop-down select on > create/update a person's record in the SQLFORM.smartgrid: > > - A person cannot select himself as his partner > - A person can only select a partner that is single > > db((db.person.partner == None) & (db.person.id != *cur

[web2py] Re: Web2py locks row at auth_user and web2py_session_* tables and doesn't unlock them

2018-04-21 Thread Anthony
> > A quick comment about a couple of tests I did regarding RedisSession (that > also has a "with_lock" argument). > To the test, I updated web2py locally to version > 2.16.1-stable+timestamp.2017.11.14.05.54.25 > And then I run my apps using: > >- RedisSession(..., with_lock=False) >Thi

[web2py] 1 field with 2 different represent

2018-04-21 Thread 黄祥
*case:* let say i have field mobile_phone in the table, i want whatever user input can shown in two format: 123 and https://api.whatsapp.com/send?phone=123";>123 is it possible to have 1 field with 2 different represent or should i create virtual field or just create new field? thx and best reg

[web2py] Re: Web2py locks row at auth_user and web2py_session_* tables and doesn't unlock them

2018-04-21 Thread Lisandro
El sábado, 21 de abril de 2018, 18:00:36 (UTC-3), Anthony escribió: > > A quick comment about a couple of tests I did regarding RedisSession (that >> also has a "with_lock" argument). >> To the test, I updated web2py locally to version >> 2.16.1-stable+timestamp.2017.11.14.05.54.25 >> And then I