[web2py] Re: Build query without DB connection

2017-09-20 Thread Massimo Di Pierro
In web2py, and in general in code that runs multithreaded you should not define variables in modules at top level and then import them because they are cached and then shared by multiple threads. That is not thread safe and will cause all kind of problems. Modules should define functions and

[web2py] Re: Future releases and support

2017-09-20 Thread Massimo Di Pierro
I second what Anthony said. There are less commits because the code is solid and grew up to be quite complex. Also we are thinking about where to go from here. On Monday, 11 September 2017 06:48:50 UTC-5, Anthony wrote: > > On Monday, September 11, 2017 at 2:46:17 AM UTC-4, Arnab Dutta wrote:

[web2py] web2py and pouchdb

2017-09-20 Thread 黄祥
is web2py can work with pouchdb ? any example of DAL pouchdb connection ? thanks and best regards, stifan -- 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)

[web2py] Re: Basic question about app compile

2017-09-20 Thread Anthony
> After compiling the Welcome app, I tried two things. I moved out the > source files from the controllers, models, and views folders, and either > just left the compiled folder in place, > That should work but does not in 2.15 due to a bug, for which I have submitted a pull request. See

[web2py] Re: Basic question about app compile

2017-09-20 Thread 黄祥
in web2py appadmin after you compile the web app, there is "pack compiled", to download the compiled webapp without the source code, reupload the compiled webapp into new webapp, then you can learn from it which source code is removed from pack compiled. when the web app is compiled (the source

[web2py] Basic question about app compile

2017-09-20 Thread Jordan Ladora
Hi, I was just wondering how the folder layout works when byte compiling an app. I was trying some things on the basic Welcome app to try and sort it out. After compiling the Welcome app, I tried two things. I moved out the source files from the controllers, models, and views folders, and

[web2py] Re: Compiled and installed apps throw error after updating a folder that is outside web2py

2017-09-20 Thread Lisandro
Oh I see! Yes, that's the reason, because my administrative app already uses subprocess to clone and update repositories, but always from a scheduled task. This is the only case where I used subprocess directly in a controller function. Now I understand better. I'll move that code into a

[web2py] Re: Compiled and installed apps throw error after updating a folder that is outside web2py

2017-09-20 Thread Anthony
The issue is probably related to opening a subprocess in uWSGI, not the external folder into which you are copying files. Have a look at https://stackoverflow.com/a/17607704. Maybe setting "--close-on-exec" in your uWSGI configuration will work. Alternatively, consider using the web2py

[web2py] Re: Show sqlform when button is clicked

2017-09-20 Thread Leonel Câmara
Use bootstrap collapse. -- 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 Groups

[web2py] Show sqlform when button is clicked

2017-09-20 Thread Mujeeb Farees
The code is as follows, *Controller* def index(): form = SQLFORM( db.home, submit_button = 'Save' ) *View* Home Add Home {{=form}} I want to make the form visible only when "Add Home" button is clicked. Any suggestions? -- Resources: -

[web2py] Compiled and installed apps throw error after updating a folder that is outside web2py

2017-09-20 Thread Lisandro
Hi, I'm having a hard time to figure out why web2py throws this error in this scenario. I have one web2py installation, with the same app installed **a lot** of times. The app is a simple app I've designed to create and mantain your own website. So the app is one, but it's installed several

[web2py] Re: form in bootstrap modal

2017-09-20 Thread Leonel Câmara
One way to do it is to load the form in the modal's body using $.web2py.component when the user triggers the action that opens it, then you can use response.js to close the modal if the form is submitted without errors. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Build query without DB connection

2017-09-20 Thread Brendan Barnwell
It seems that the "db" object given by the DAL wraps up not only the database definition, but also a "live" connection to the database. This means that if the db object is stashed somewhere, it can go "stale" and attempts to use it later will lead to strange errors. Is that so? What I'm