[web2py] Re: Adding up values in a selected SQLFORM.grid column

2019-04-14 Thread mostwanted
Yes Dave, it is in response to pressing a button labeled total, you must be living in my mind hahaha, but thanks for the reply, i will try it out. On Sunday, April 14, 2019 at 9:29:18 PM UTC+2, Dave S wrote: > > On Sunday, April 14, 2019 at 6:25:10 AM UTC-7, mostwanted wrote: >> >> I was

[web2py] Re: Web3py

2019-04-14 Thread 黄祥
*test dockerfile provided on web3py* *1st attempt from github (not worked)* git clone https://github.com/web2py/web3py cd web3py/docker docker build -t test/web3py_git . docker run -d \ -p 8000:8000 \ --name web3py_git \ test/web3py_git $ docker ps -a CONTAINER IDIMAGE

[web2py] Re: Web3py

2019-04-14 Thread Massimo Di Pierro
hanks. fixed.t On Sunday, 14 April 2019 17:42:29 UTC-7, 黄祥 wrote: > > test work for Makefile and setup.py > *web3py/setup.py* > install_requires=[ > 'bottle', > 'gunicorn', > 'gevent', > 'pydal3', > *'pyjwt',* > 'yatl', > 'reloader', >

Re: [web2py] Re: Does web2py support SSE (server sent events) from HTML5?

2019-04-14 Thread Massimo Di Pierro
for apps with lots of traffic quickly becomes a bottle neck. SSE is a little better. Websockets are much better. On Sunday, 14 April 2019 10:42:55 UTC-7, Kevin Keller wrote: > > Whats wrong with polling every so often? > > > > On Sun, 14 Apr 2019, 19:41 Kevin Keller, wrote: > >> Should do it >>

[web2py] Re: Web3py

2019-04-14 Thread 黄祥
test work for Makefile and setup.py *web3py/setup.py* install_requires=[ 'bottle', 'gunicorn', 'gevent', 'pydal3', *'pyjwt',* 'yatl', 'reloader', ], best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: Duplicates in SQLgrid

2019-04-14 Thread Jacob
Unfortunately the alternative isn't enough, I've looked into distinct = True, but as I mentioned earlier I couldn't get it to work with the SQLFORM.grid sorry again I'm still very new to python and web2py. My code looks like this controller contains: def car_records(): fields

[web2py] Re: Web3py

2019-04-14 Thread 黄祥
docker pull ubuntu docker run -it --privileged ubuntu /bin/bash apt update apt install -y git python3-pip make git clone https://github.com/web2py/web3py cd web3py make make install # ./web3py-start applications/ Traceback (most recent call last): File "./web3py-start", line 3, in from

[web2py] Re: I'm trying to open the app. but it gives this error.

2019-04-14 Thread 黄祥
pls show some code on default.py around line 1130 or 2012, and paste the error traceback (no images) 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

[web2py] Re: Web3py

2019-04-14 Thread Massimo Di Pierro
I moved it. /todo/index is the only functional app The other examples are not really designed to do do anything interesting yet. On Sunday, 14 April 2019 02:12:46 UTC-7, 黄祥 wrote: > > *test latest commit on docker because seen the Makefile in there* > docker pull ubuntu > docker run -it

[web2py] Does the latest version of web2py still not allow us to specify key field as UUID ?

2019-04-14 Thread Robert Gilbert
I am using the latest version of web2py and want to implement UUID as my primary Key. Just checking if I still have to use a workaround and create a separate uuid field while web2py uses an internal ID (integer) field as record identifier ? Longing for the day when we have a choice in Models

[web2py] update a table with data from another table or criteria based on a linked table

2019-04-14 Thread icodk
Is it possible to use DAL syntax to update a table based on a join to another table ? Resulting something like : UPDATE employees SET employees.first_name = contacts.first_name FROM employees INNER JOIN contacts ON (employees.contact_id = contacts.id) WHERE contact.id = 101; -- Resources: -

Re: [web2py] Re: Web2py binaries

2019-04-14 Thread Nico Zanferrari
Hi all, I've just updated the experimental binaries for MacOs and Windows to the latest web2py version (2.18.5) on https://github.com/nicozanf/web2py-pyinstaller . They now contain python 3.7.3 64 bit. Also, the web2py sources inside the ZIP is now replaceble with newer web2py versions when

[web2py] Re: Adding up values in a selected SQLFORM.grid column

2019-04-14 Thread Dave S
On Sunday, April 14, 2019 at 6:25:10 AM UTC-7, mostwanted wrote: > > I was wondering if there is a way to add up values in a desired > SQLFORM.grid column? and if there is how is it performed? > > Mostewnted > Is this in response to pressing a button, perhaps labeled "Total"? I'd look at an

Re: [web2py] Re: Does web2py support SSE (server sent events) from HTML5?

2019-04-14 Thread Kevin Keller
Whats wrong with polling every so often? On Sun, 14 Apr 2019, 19:41 Kevin Keller, wrote: > Should do it > > https://www.tornadoweb.org/en/stable/wsgi.html > > On Sun, 14 Apr 2019, 09:18 Massimo Di Pierro, > wrote: > >> I do not know. >> >> On Saturday, 13 April 2019 12:06:46 UTC-7, João

Re: [web2py] Re: Does web2py support SSE (server sent events) from HTML5?

2019-04-14 Thread Kevin Keller
Should do it https://www.tornadoweb.org/en/stable/wsgi.html On Sun, 14 Apr 2019, 09:18 Massimo Di Pierro, wrote: > I do not know. > > On Saturday, 13 April 2019 12:06:46 UTC-7, João Matos wrote: >> >> It would be great if web3py would support SSE. >> >> For now, the websocket solution would

[web2py] SQLgrid search bar position

2019-04-14 Thread Jacob
Hello, is it possible to move the position of the search bar that comes with the SQLgrid? I'm trying to move it to the center of the page on top of the results rather than have it on the left along with it's buttons. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] YATL + pyDAL with Flask.. template not rendering with right variable

2019-04-14 Thread Kevin Keller
Having a translation layer for different frameworks would be too much to maintain I think. But if you could implement a way that some defaults can be easily overrriden, where it makes sense.. that would be great. What that means will be a bit different from module to module I suppose, but for

[web2py] Re: Duplicates in SQLgrid

2019-04-14 Thread Jacob
Thank you for replying couldn't get it to work with the grid but found an alternative for now. On Sunday, April 14, 2019 at 9:26:18 AM UTC+1, João Matos wrote: > > Check distinct=True in the book. > > domingo, 14 de Abril de 2019 às 04:27:33 UTC+1, Jacob escreveu: >> >> Hello I'm new to web2py

Re: [web2py] YATL + pyDAL with Flask.. template not rendering with right variable

2019-04-14 Thread Massimo Di Pierro
I would be happy to keep the logic in form.py and other upcoming modules framework agnostic. If you have ideas about how to best do that, please let me know On Saturday, 13 April 2019 10:03:49 UTC-7, Kevin Keller wrote: > > Changing the import headers of form.py from web3py like this: > >

[web2py] Adding up values in a selected SQLFORM.grid column

2019-04-14 Thread mostwanted
I was wondering if there is a way to add up values in a desired SQLFORM.grid column? and if there is how is it performed? Mostewnted -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Converting large app from Python2 to Python3 - how do you handle code in views ?

2019-04-14 Thread Octavian G
My reasoning so far is that the best way to do this is: Step 1: parse a view.html file to extract the python code between "{{" and "}}" and output it to a file view.html.py where "{{" and "}}" are replaced with comments like: #1 if bla: #/1 #2 pass #/2 Step 2: create a view3.html where "{{" and

[web2py] Converting large app from Python2 to Python3 - how do you handle code in views ?

2019-04-14 Thread Octavian G
Hello group, I've started porting a large app from Python2 to Python3. I've used 2to3 and some manual work to convert models, controllers and modules to Python3 but now I got to the views and I'm stumped. Basically, I think I would need a way to isolate the python code from the

[web2py] Re: Web3py

2019-04-14 Thread 黄祥
*test latest commit on docker because seen the Makefile in there* docker pull ubuntu docker run -it --privileged ubuntu /bin/bash apt update apt install -y git python3-pip git clone https://github.com/web2py/web3py cd web3py pip3 install -r requirements.txt # ./web3py-start applications/

[web2py] Re: Duplicates in SQLgrid

2019-04-14 Thread João Matos
Check distinct=True in the book. domingo, 14 de Abril de 2019 às 04:27:33 UTC+1, Jacob escreveu: > > Hello I'm new to web2py and I have a query which joins tables and displays > the results in an SQLgrid. Within the grid of results there values which > are appearing more than once due to many

[web2py] Re: Is it possible to send all args & vars from a view/controller to another using POST instead of GET?

2019-04-14 Thread João Matos
Thanks. sábado, 13 de Abril de 2019 às 22:32:20 UTC+1, Anthony escreveu: > > On Saturday, April 13, 2019 at 3:00:06 PM UTC-4, João Matos wrote: >> >> What I would like is to "hide" all the args and vars from the end user. >> Couldn't the browser send the args and vars using POST to the web2py >>

[web2py] Re: Does anyone know if it's possible & how I can distinguish, from web2py perspective, 2 browser tabs?

2019-04-14 Thread João Matos
Ok, thanks Anthony and Massimo. domingo, 14 de Abril de 2019 às 08:20:37 UTC+1, Massimo Di Pierro escreveu: > > yes but do not use random() use str(uuid.uuid4()) > > On Saturday, 13 April 2019 14:03:27 UTC-7, João Matos wrote: >> >> I think I found a way. >> Without even using HTML5

[web2py] Re: Does anyone know if it's possible & how I can distinguish, from web2py perspective, 2 browser tabs?

2019-04-14 Thread Massimo Di Pierro
yes but do not use random() use str(uuid.uuid4()) On Saturday, 13 April 2019 14:03:27 UTC-7, João Matos wrote: > > I think I found a way. > Without even using HTML5 sessionStorage. > > On the index action of the default controller I insert at the beggining > if 'ssid' not in request.vars: >

[web2py] Re: Does web2py support SSE (server sent events) from HTML5?

2019-04-14 Thread Massimo Di Pierro
I do not know. On Saturday, 13 April 2019 12:06:46 UTC-7, João Matos wrote: > > It would be great if web3py would support SSE. > > For now, the websocket solution would work with Apache? > > sábado, 13 de Abril de 2019 às 16:26:13 UTC+1, Massimo Di Pierro escreveu: >> >> No. we do provide a