[web2py] SQLFORM.grid and oncreate error

2016-12-02 Thread Scott Hunter
If the oncreate callback for a SQLFORM.grid sets form.errors to true, the record is not created; similarly, if form.errors. is set to an error message. However, shouldn't the form for adding the record return, and in the latter case, with the specified fields showing their error messages? In m

[web2py] Re: web2py as Grafana endpoint

2016-12-02 Thread Dave S
On Friday, December 2, 2016 at 12:10:55 PM UTC-8, Dave S wrote: > > > > On Thursday, December 1, 2016 at 12:15:50 AM UTC-8, Dave S wrote: >> >> >> >> On Monday, November 28, 2016 at 11:11:48 PM UTC-8, Dave S wrote: >>> >>> On Monday, November 28, 2016 at 3:23:59 PM UTC-8, Massimo Di Pierro >>> w

[web2py] Re: How to solve vertical alignment too high of SQLForm read-only field

2016-12-02 Thread Paolo Caruccio
My previous answer was too short. I was in a hurry. So I want elaborate it more. Martin wrote to have an alignment problem between the label and the text that SQLFORM generates when the field is not writable. Web2py in this context gives to the label of not writable field the css class "readonly

[web2py] Cannot access db in a thread

2016-12-02 Thread Harshad
I have a separate process that I run along with my web application by creating a subprocess like so: subprocess.Popen("python web2py.py -v -e -a admin -i 0.0.0.0 -p 8080 -c -k ".split()) subprocess.Popen("python web2py.py -S -M -R ".split()) In that process, I start a thread to do

[web2py] Re: How to solve vertical alignment too high of SQLForm read-only field

2016-12-02 Thread Anthony
On Friday, December 2, 2016 at 12:37:44 PM UTC-5, Pierre wrote: > > sorry to insist Anthony > but the *select* tags (used for reference fields) are still editable with > *readonly="readonly"* > your first option with *_disabled* works for me.alignment is > perfect and it's safe > OK, g

Re: [web2py] Re: Performance using MSSQL stored procedures

2016-12-02 Thread Brian M
https://datatables.net/extensions/scroller/examples/ if you must have huge numbers of rows displayed. On Friday, December 2, 2016 at 2:25:14 PM UTC-6, Dave S wrote: > > On Friday, December 2, 2016 at 12:33:46 AM UTC-8, Gabor Nyul wrote: >> >> Brian, >> >> In fact this is already done. I have a c

[web2py] Re: Checking if user is offline/online

2016-12-02 Thread Massimo Di Pierro
You need a websocket server like web2py/gluon/contrib/websocket_messaging.py Examples are i the file itself. On Friday, 2 December 2016 12:11:08 UTC-6, Ramos wrote: > > What could be the best way to check if a user is disconnects? > > I was thinking of this > > >$(document).ready(f

[web2py] Re: Forgot Password not working?

2016-12-02 Thread Massimo Di Pierro
Are you using T(...) to translate a message sent via email? On Friday, 2 December 2016 12:06:24 UTC-6, Robert Porter wrote: > > I get this error when trying "Forgot Password": > > tools.py:808 - Mail.send failure:coercing to Unicode: need string or > buffer, lazyT found > > This is running on GA

[web2py] Re: SQLFORM.FACTORY editing a document. Save reports no upload files

2016-12-02 Thread Massimo Di Pierro
1. I do not now. that is outside of web2py control. it is controlled by the browser 2. you can just use form = SQLFORM.factory(Field('myfile','upload')).process() and then if form.accepted: request.vars.myfile.file.seek(0) data = request.vars.myfile.file.read() On Thursday, 1 December 2016

[web2py] Re: Is web2py better for interacting with python scripts?

2016-12-02 Thread Massimo Di Pierro
One big issues is wether this is synchronous or asynchronous. If the script takes time you need to write the output to a file and read it incrementally when polled by the web app. it may be convent to wrap your script in a service and have the web app call the service. On Thursday, 1 December 2

[web2py] Re: Javascript functions for Canvas not working

2016-12-02 Thread Dave S
On Friday, December 2, 2016 at 11:55:33 AM UTC-8, Brian M wrote: > > In case others have this sort of a problem where javascript events are > affected by the css of bootstrap... > > The problem was in the css file: bootstrap.min.css > > Somehow the relative position causes the event not to bubb

Re: [web2py] Re: Performance using MSSQL stored procedures

2016-12-02 Thread Dave S
On Friday, December 2, 2016 at 12:33:46 AM UTC-8, Gabor Nyul wrote: > > Brian, > > In fact this is already done. I have a complete specification of each > report. > Just to give you an example: We are a railway company, having several > hundreds of train per day. There are a lots of modification

[web2py] Re: web2py as Grafana endpoint

2016-12-02 Thread Dave S
On Thursday, December 1, 2016 at 12:15:50 AM UTC-8, Dave S wrote: > > > > On Monday, November 28, 2016 at 11:11:48 PM UTC-8, Dave S wrote: >> >> On Monday, November 28, 2016 at 3:23:59 PM UTC-8, Massimo Di Pierro wrote: >>> >>> response from web2py controller? web2py returns bytes. It is up to yo

[web2py] Re: import issues

2016-12-02 Thread Dave S
On Friday, December 2, 2016 at 4:50:28 AM UTC-8, Niphlod wrote: > > simplejson was dropped, as we target 2.7 only and there's the json module > globally available. you should use that. > > I **think** this still works, but it's the only thing permitted. > > > from gluon.contrib.simplejson import

[web2py] Re: Javascript functions for Canvas not working

2016-12-02 Thread Brian M
In case other have this sort of a problem where javascript events are affected by the css of bootstrap... the problem was in the css file: bootstrap.min.css somehow the relative position causes the event not to bubble up. How jacked up is that? .col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-

[web2py] Checking if user is offline/online

2016-12-02 Thread António Ramos
What could be the best way to check if a user is disconnects? I was thinking of this $(document).ready(function() { $(window).bind("beforeunload", function() { *call a controller function to set the user as offline* }); }); but this is not perfect because when

[web2py] Forgot Password not working?

2016-12-02 Thread Robert Porter
I get this error when trying "Forgot Password": tools.py:808 - Mail.send failure:coercing to Unicode: need string or buffer, lazyT found This is running on GAE locally. It works fine for a welcome email and for "Lost Username". -- Resources: - http://web2py.com - http://web2py.com/book (Docu

[web2py] Re: How to solve vertical alignment too high of SQLForm read-only field

2016-12-02 Thread Pierre
sorry to insist Anthony but the *select* tags (used for reference fields) are still editable with *readonly="readonly"* your first option with *_disabled* works for me.alignment is perfect and it's safe -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] Re: admin interface

2016-12-02 Thread Anthony
On Friday, December 2, 2016 at 9:29:00 AM UTC-5, Annet wrote: > > Hi, > > Thanks for your reply. You mean an empty .py file named DISABLED > That will completely disable the app, not prevent it from showing up in admin. > > What does ATM stand for? > "at the moment," probably. Anthony -- R

[web2py] Re: admin interface

2016-12-02 Thread Anthony
On Friday, December 2, 2016 at 5:38:56 AM UTC-5, Annet wrote: > > I have an application with limited functionality in which I want to access > web2py's admin interface. > > I have 3 application in the same web2py installation in which I want to > disable the admin interface. > So, when you log int

[web2py] Re: admin interface

2016-12-02 Thread 'Annet' via web2py-users
Hi, Thanks for your reply. You mean an empty .py file named DISABLED What does ATM stand for? Kind regards, Annet -- 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

[web2py] Re: How to solve vertical alignment too high of SQLForm read-only field

2016-12-02 Thread Anthony
On Friday, December 2, 2016 at 6:07:41 AM UTC-5, Pierre wrote: > > the readonly prop doesn't prevent users from "messing-up" with the > readonly fields and to change their values (reference fields) at list in > the form: not very clean user interface in my opinion..:( > Yes, they do prevent

Re: [web2py] Re: password validator

2016-12-02 Thread Marvi Benedet
Sorry for the delay, I was busy on other tasks. I tried and works like a charm! Many thanks! 2016-11-24 2:35 GMT+01:00 Anthony : > On Wednesday, November 23, 2016 at 8:20:48 AM UTC-5, Marvix wrote: >> >> so, is there a way to disable the password validator in the login form >> without modify w

[web2py] Re: admin interface

2016-12-02 Thread Niphlod
you open /admin ?! why is that an issue ? BTW: for disabling ATM you can just put a "DISABLED" file in the root folder of the app. On Friday, December 2, 2016 at 11:38:56 AM UTC+1, Annet wrote: > > I have an application with limited functionality in which I want to access > web2py's admin inte

[web2py] Re: import issues

2016-12-02 Thread Niphlod
simplejson was dropped, as we target 2.7 only and there's the json module globally available. you should use that. I **think** this still works, but it's the only thing permitted. from gluon.contrib.simplejson import json On Friday, December 2, 2016 at 2:37:36 AM UTC+1, Dave S wrote: > > As

[web2py] Re: How to solve vertical alignment too high of SQLForm read-only field

2016-12-02 Thread Pierre
the readonly prop doesn't prevent users from "messing-up" with the readonly fields and to change their values (reference fields) at list in the form: not very clean user interface in my opinion..:( -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

[web2py] admin interface

2016-12-02 Thread 'Annet' via web2py-users
I have an application with limited functionality in which I want to access web2py's admin interface. I have 3 application in the same web2py installation in which I want to disable the admin interface. Is this possible and how would I do this. Kind regards, Annet -- Resources: - http://web2p

Re: [web2py] Re: Performance using MSSQL stored procedures

2016-12-02 Thread Gabor Nyul
Brian, In fact this is already done. I have a complete specification of each report. Just to give you an example: We are a railway company, having several hundreds of train per day. There are a lots of modifications (above 60%, Don't ask why) to the original plan where we are assigning the engine