[web2py] Re: LDAP Authentication never work

2018-07-04 Thread mark
A few thoughts: Can you connect from the server where the ldap account is located? What does that connection string look like? Looking here: https://github.com/web2py/web2py/blob/master/gluon/contrib/login_methods/ldap_auth.py It boils down to the init_ldap method and ldap.initialize() You ca

[web2py] Re: Here's how to run Web2Py on IBM BlueMix

2018-07-04 Thread Anthony
Not sure if this is the only problem, but in run.sh, the call to web2py.py in the "else" block does not specify an ip address, so it will default to 127.0.0.1, which will run the server on localhost only. You should instead specify "-i 0.0.0.0". Anthony On Wednesday, July 4, 2018 at 12:03:31 P

[web2py] Re: custom maxlengths on create/edit grid

2018-07-04 Thread JSalvat
Thanks Anthony, this really does the perfect job, much simpler !! El miércoles, 4 de julio de 2018, 16:16:54 (UTC+2), Anthony escribió: > > First, you can use the same approach with the grid that you are using with > SQLFORM, as the grid simply produces a SQLFORM when creating or updating > rec

[web2py] Re: Here's how to run Web2Py on IBM BlueMix

2018-07-04 Thread Serge Bourgeois
July 4, 2018 Hello, At first, thanks to all of you for the web2py and all the the dynamic that you generate around this project! Here is one link to store a recipe could be here for deploying web2py on IBM Cloud (new name of Bluemix): https://developer.ibm.com/recipes/tutorials/category/web-de

[web2py] Re: cannot make ondelete='SET NULL' to work

2018-07-04 Thread JSalvat
True, it worked this way. after db.table.drop() imported again the records and the ondelete='SET NULL' at the field definition does the job ok now. Thanks Anthony El miércoles, 4 de julio de 2018, 16:20:04 (UTC+2), Anthony escribió: > > On Wednesday, July 4, 2018 at 10:12:58 AM UTC-4, J

[web2py] Re: custom maxlengths on create/edit grid

2018-07-04 Thread JSalvat
Anthony, I was trying to deploy a generic function on my own formstyle in sqlform.py that does the work for any field in any grig that passes a maxtextlengths attribute with the desired widths for every field. Any posible solution to this? Many thanks. El miércoles, 4 de julio de 2018, 16:16:5

[web2py] Re: cannot make ondelete='SET NULL' to work

2018-07-04 Thread Anthony
On Wednesday, July 4, 2018 at 10:12:58 AM UTC-4, JSalvat wrote: > > Hi Pierre, how did you solve this ? > > ondelete='SET NULL' on sqlite is not working, it deletes all records on > the child table associated with the deleted record on the father table > instead of seting empty on the refered

[web2py] Re: custom maxlengths on create/edit grid

2018-07-04 Thread Anthony
First, you can use the same approach with the grid that you are using with SQLFORM, as the grid simply produces a SQLFORM when creating or updating records. Note, web2py DOM objects have an .add_class() method, so you can use that instead of manually extracting and updating the "_class" attribut

[web2py] Re: cannot make ondelete='SET NULL' to work

2018-07-04 Thread JSalvat
Hi Pierre, how did you solve this ? ondelete='SET NULL' on sqlite is not working, it deletes all records on the child table associated with the deleted record on the father table instead of seting empty on the refered field. Thanks for your help. El jueves, 28 de enero de 2016, 13:13:50 (

[web2py] Re: custom maxlengths on create/edit grid

2018-07-04 Thread JSalvat
Yes, but the maxtextlength attribute works only on the grid, and I think is not accesible from the generic create/edit form created by the grid. How the maxtextlength attribute be used in the form? El miércoles, 4 de julio de 2018, 12:58:12 (UTC+2), 黄祥 escribió: > > think there is maxtextlength

[web2py] Re: custom maxlengths on create/edit grid

2018-07-04 Thread 黄祥
think there is maxtextlength attribute on sqlform.grid signature, but not sure if it suitable with your css class definition ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid-signature best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/

[web2py] custom maxlengths on create/edit grid

2018-07-04 Thread JSalvat
Hi, How to custom an input field width class='col-sm-x' in create/edit forms that come from SQLFORM.grid On SQLFORM can be done this way: form = SQLFORM(db.movimiento) if form.element('#movimiento_cantidad'): wclass = form.element('#movimiento_cantidad')['_class'] form.element('#mo