[web2py] Re: https and stripe

2016-10-25 Thread Anthony
> scripts/setup-web2py-nginx-uwsgi-on-centos.sh > scripts/setup-web2py-nginx-uwsgi-ubuntu.sh''' > > Does this mean that once I complete these steps then I'll have > successfully deployed to nginx and that I'm able to access the website from > online? > Yes, though you will need to take additio

[web2py] Re: question about scheduler

2016-10-25 Thread Dave S
On Tuesday, October 25, 2016 at 5:12:09 PM UTC-7, 黄祥 wrote: > > learn from niphlod github about web2py scheduler test, there are some > question about it: > 1. is it neccessary to delete all data in table scheduler_worker, > scheduler_task, scheduler_run before queue the task? > *e.g.* > def cl

[web2py] Re: https and stripe

2016-10-25 Thread Jaimee S
Thanks for the tips! That leads me to more questions I found this on web2py from your link: ''' All these steps are performed automatically by the provided scripts: 1 2 scripts/setup-web2py-nginx-uwsgi-on-centos.sh scripts/setup-web2py-nginx-uwsgi-ubuntu.sh''' Does this mean that once I comple

[web2py] Re: Efficiency in compiled appliance

2016-10-25 Thread Anthony
On Wednesday, May 18, 2016 at 3:42:50 PM UTC-4, Scott Hunter wrote: > > The web2py book, under Efficiency Tricks, says: > > >- Do not put many functions in the same controller but use many >controllers with few functions. > > When an appliance is compiled, each of the functions is compiled

[web2py] Re: order by the greater of 2 fields

2016-10-25 Thread Anthony
> > Hi all, > This gets the results using sql but only able to do one or the other is > the controller in web2py > select * from animalTask order by > GREATEST(COALESCE(withhold_until_date,0),COALESCE(esi_withhold_until_date,0)) > DESC > What do you mean by "one or the other" -- what is "the

Re: [web2py] Re: update_or_insert does not return id of record ?!

2016-10-25 Thread Anthony
On Tuesday, October 25, 2016 at 5:12:39 PM UTC-4, Ramos wrote: > > Yes i added a new field to an existing table. > So all of them became empty in that field. > i then executed > than i have another app that calls a controller in this app and passes > some data in request.vars > the controller in

[web2py] Re: https and stripe

2016-10-25 Thread Anthony
You can serve a web2py app over HTTPS or not -- there is nothing in particular that web2py must do, though, as that is handled by the web server not the framework. If you are using the web2py built-in web server (which you should generally not be doing in production), that too does support HTTP

[web2py] question about scheduler

2016-10-25 Thread 黄祥
learn from niphlod github about web2py scheduler test, there are some question about it: 1. is it neccessary to delete all data in table scheduler_worker, scheduler_task, scheduler_run before queue the task? *e.g.* def clear_all(): swstatus = db(db.scheduler_worker.id > 0).delete() srstatus = db(

[web2py] https and stripe

2016-10-25 Thread Jaimee S
Recently I've been working on integrating stripe. I've been unable do to the fact that it requires an https connection. I've looked into obtaining one, but I'm not exactly sure how to. Does web2py not offer ssl support? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

Re: [web2py] Re: update_or_insert does not return id of record ?!

2016-10-25 Thread António Ramos
Yes i added a new field to an existing table. So all of them became empty in that field. i then executed than i have another app that calls a controller in this app and passes some data in request.vars the controller in this app then does this id=db.empresa.update_or_insert(db.empresa.ruuid==reques

Re: [web2py] Re: Deployment question

2016-10-25 Thread Jim S
mcm - thanks for that. On Tuesday, October 25, 2016 at 12:23:27 PM UTC-5, mcm wrote: > > One clarification ... better performance is mostly due to the fact that > the python GIL is not getting in the way > > 2016-10-25 19:20 GMT+02:00 Michele Comitini >: > >> > Regarding switching uwsgi to f

Re: [web2py] Migrate integer field to string type

2016-10-25 Thread Dave S
On Tuesday, October 25, 2016 at 8:08:28 AM UTC-7, Ian W. Scott wrote: > > Okay, that's what I was afraid of. Thanks. > > Ian > > On Tuesday, October 25, 2016 at 10:06:19 AM UTC-4, Richard wrote: >> >> You can't just change the field type, you have to create another column >> of string type then

[web2py] Re: order by the greater of 2 fields

2016-10-25 Thread Dave S
On Tuesday, October 25, 2016 at 3:56:42 AM UTC-7, Anthony Smith wrote: > > > Hi all, > This gets the results using sql but only able to do one or the other is > the controller in web2py > select * from animalTask order by > GREATEST(COALESCE(withhold_until_date,0),COALESCE(esi_withhold_until_d

Re: [web2py] Re: update_or_insert does not return id of record ?!

2016-10-25 Thread Dave S
On Tuesday, October 25, 2016 at 2:27:35 AM UTC-7, Ramos wrote: > > Strange thing happened > > I created another field called ruuid in table empresa then this code: > > uuid=request.vars.uuid > entity=request.vars.entity > > id=db.empresa.update_or_insert(db.empresa.ruuid==request.vars.ruuid,empre

Re: [web2py] Re: Randomly stuck web2py

2016-10-25 Thread Michele Comitini
You can try to log/debug something meaningful using web2py's loggin framework: http://web2py.com/books/default/chapter/29/04/the-core?search=logger#Logging BTW the CTRL-C (SIGINT) seems to show that the process is in the middle of some I/O operation. Try to use the strace command strace -o logfile

Re: [web2py] Re: Deployment question

2016-10-25 Thread Michele Comitini
One clarification ... better performance is mostly due to the fact that the python GIL is not getting in the way 2016-10-25 19:20 GMT+02:00 Michele Comitini : > > Regarding switching uwsgi to fork-only - should I expect a performance > hit? > > Unless you are very low on RAM you should expect

Re: [web2py] Re: Deployment question

2016-10-25 Thread Michele Comitini
> Regarding switching uwsgi to fork-only - should I expect a performance hit? Unless you are very low on RAM you should expect better performance. Linux fork is a clone call that uses fully fledged copy-on-write strategy. Uwsgi forks are long running processes so forking overhead has little impa

Re: [web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-10-25 Thread Scott Hunter
Sure, but there's not much to see. When I launch the app (after Safari, presumably, has unzipped it), I get: I click Open, and

Re: [web2py] Re: Deployment question

2016-10-25 Thread Jim S
Richard Just checked my versions and my old systems that work have: uwsgi 2.0.10 nginx 1.4.6 web2py 2.14.6 New system that needs altered uwsgi config uwsgi 2.0.14 nginx 1.10.0 web2py 2.14.6 My uwsgi configs are identical except for the commented out 'limit-as = 512' line. Nginx configs are i

Re: [web2py] Mithril i.e. the client MVC war continues

2016-10-25 Thread Richard Vézina
It blazingly fast... The comparison is extensive and informative... Thanks for sharing. Richard On Tue, Oct 25, 2016 at 5:33 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > OK so you thought that vue.js was good enough... > > Take a look on mithril: > > http://mithril.js.org/ > > >

[web2py] Re: Add direct link in grid to edit page for connected table

2016-10-25 Thread Nicola Clementel
Solved! The problem was ignoring the connection with table_1: table_3 and 4 names are equal to the db.table_1.name values. The following code is working. The only things I don't understand is why it is necessary to use the "try:" syntax. Without it, even though the link is correctly created a

Re: [web2py] Migrate integer field to string type

2016-10-25 Thread Ian W. Scott
Okay, that's what I was afraid of. Thanks. Ian On Tuesday, October 25, 2016 at 10:06:19 AM UTC-4, Richard wrote: > > You can't just change the field type, you have to create another column of > string type then insert your data from a select of the other column into it > then delete the old use

Re: [web2py] Re: Randomly stuck web2py

2016-10-25 Thread Wasim Baig
Hi Niphlod/Michele: Thanks for the suggestions. Will put a rate limiter in front of Rocket just to be sure. I wasn't able to see anything in the logs, actually, all I have is the httpserver.log. How can I get web2py to log more what its doing internally? -D 100 didn't do anything, or maybe I did

[web2py] Custom formstyle for auth

2016-10-25 Thread Marko Seppälä
Hi, I'm trying to set custom form styles for auth, like register or login form. I would like to set completely new formstyle function for that, so that it's easy to use over and over again just setting formstyle = my_formstyle in appconfig.ini. How I could do that? I can use formstyle_bootstra

Re: [web2py] Re: Deployment question

2016-10-25 Thread Richard Vézina
Jim which web server are we talking now? Nginx? I think you should copy/paste configuration so we can have look, I can compare to mine... Just the relevant part would suffice... About threading notice of pandas it says holding lock in case of multiple dataframe copy, but Jim report he can't even i

Re: [web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-10-25 Thread Roberto Perdomo
I'm using Web2py 2.14.6 in sierra and cannot reproduce your errors. Can you show the errors or warnings? El 25 oct. 2016 10:36 AM, "Scott Hunter" escribió: > Am I to interpret from the deafening silence that I am the only one seeing > this problem? Even if that is the case, any ideas how I can

[web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-10-25 Thread Scott Hunter
Am I to interpret from the deafening silence that I am the only one seeing this problem? Even if that is the case, any ideas how I can resolve it, or where I might go to find any? - Scott On Wednesday, October 19, 2016 at 12:17:45 PM UTC-4, Scott Hunter wrote: > > When I download & run a fresh

[web2py] Re: Efficiency in compiled appliance

2016-10-25 Thread Scott Hunter
Not clear what you are asking. If compiling an app results in each function being in its own file whether they came from distinct source files or not, what is the benefit to having each function start off in its own file? - Scott On Wednesday, May 18, 2016 at 5:02:35 PM UTC-4, Niphlod wrote: >

Re: [web2py] Migrate integer field to string type

2016-10-25 Thread Richard Vézina
You can't just change the field type, you have to create another column of string type then insert your data from a select of the other column into it then delete the old useless column... You need to transform the integer into text at the insert step... Richard On Mon, Oct 24, 2016 at 3:32 PM, I

Re: [web2py] Re: Deployment question

2016-10-25 Thread Jim Steil
Massimo / Michele Thanks for the input. I don't know anything about fork only mode. Looks like I have some reading to do. Thanks again for the input. -Jim On Tue, Oct 25, 2016 at 4:02 AM, Michele Comitini < michele.comit...@gmail.com> wrote: > @Jim as per Massimo input, did you check that y

[web2py] Re: Login - message "invalid email" - on mobil

2016-10-25 Thread Beat Kohler
Hi Massimo sorry for the late response. I found the error. It's the smartphone ... not me :-) As usual the smartphone will propose the email address when I start to type and as usual I take it. But, I don't know why, at the end of the address is a space. Looks like the login procedure not accep

Re: [web2py] Re: Web2py freezing

2016-10-25 Thread piero crisci
The pool number is set to 10 . I tried also with 10 worker threads For what can i see there is something wrong in my app. The example app and a wizard app are correctly processed. Also the static pages like .html are fast rendered instead the pages rendered by the controller are very slow default

[web2py] Re: order by the greater of 2 fields

2016-10-25 Thread Anthony Smith
On Tuesday, 25 October 2016 01:16:19 UTC+11, Anthony wrote: > > On Monday, October 24, 2016 at 7:11:29 AM UTC-4, Anthony Smith wrote: >> >> Hi all, >> >> I have table with 2 fields, withhold _until_date and esi_withhold_until. >> >> Is is it possible to order by so the the greater of the 2 fields

[web2py] Mithril i.e. the client MVC war continues

2016-10-25 Thread Michele Comitini
OK so you thought that vue.js was good enough... Take a look on mithril: http://mithril.js.org/ http://mithril.js.org/comparison.html -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

Re: [web2py] Re: update_or_insert does not return id of record ?!

2016-10-25 Thread António Ramos
Strange thing happened I created another field called ruuid in table empresa then this code: uuid=request.vars.uuid entity=request.vars.entity id=db.empresa.update_or_insert(db.empresa.ruuid==request.vars.ruuid,empresa=entity,tipo='tr',ruuid=request.vars.uuid) instead of creating another record

Re: [web2py] Re: Randomly stuck web2py

2016-10-25 Thread Michele Comitini
@Wasim are you leaving some web2py shell open with a db transaction going? Check uptime of your machine to see if load average is high or your run in a dead-lock. I see you are using certificates, I found that python ssl sockets have some quirks depending on python vs openssl version. Of course f

Re: [web2py] Re: Deployment question

2016-10-25 Thread Michele Comitini
@Jim as per Massimo input, did you check that your uwsgi configuration is in fork mode only, no threading? That could be one possible cause. Try also gunicorn instead of uwsgi http://gunicorn.org/ 2016-10-25 7:19 GMT+02:00 Massimo Di Pierro : > Rocket is a multithreaded server and pandas is not

Re: [web2py] Re: Web2py freezing

2016-10-25 Thread Michele Comitini
[Fri Oct 21 18:02:29.083973 2016] [mpm_winnt:notice] [pid 620:tid 320] AH00354: Child: Starting 250 worker threads. This is a ridiculous high number of threads! ;-) If 10 is the magic number try looking at the pool number in your appconfig.ini. If you need high concurrency try avoiding threads a