[web2py] Re: web3py again....

2019-04-01 Thread Massimo Di Pierro
Th problem with SQLFORM is that different CSS libraries require different HTML stuctures. It is not as simple as selecting a class or div vs span. In web2py we have code to deal with bootstrap 2 and 3. We apply both classes. It is horrible. We should move away from generating html server side fo

Re: [web2py] Re: Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Nico Zanferrari
I think it's also time to switch to Python 3, at least as an option ;-) Nico Il giorno mar 2 apr 2019 alle ore 08:35 Massimo Di Pierro < massimo.dipie...@gmail.com> ha scritto: > I will talk to them. Maybe we can agree on a newer version. They do not > have to change every single version but may

Re: [web2py] Re: Clear a form after submit

2019-04-01 Thread Marvi Benedet
Would be nice to have autofocus to the first filed of all SQLFORM by default too... (Off topic annoyance: appadmin's "DB new record" form doesn't use > autofocus, and I feel it *should* take you to the first field.) > > /dps > > > -- Resources: - http://web2py.com - http://web2py.com/book (D

[web2py] Re: Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Massimo Di Pierro
I will talk to them. Maybe we can agree on a newer version. They do not have to change every single version but maybe every 3 months we can label a special version for deployment. On Monday, 1 April 2019 18:01:09 UTC-7, Ron Chatterjee wrote: > > I did. They said its lot of work to change from 2.

[web2py] Re: Redis and Python3?

2019-04-01 Thread Massimo Di Pierro
we could change True/False with 1/0 but a better approach would be to remove the value within the redis adapter. The value of locked does not do anything anyway on redis since it is not a relational database with transactions. On Sunday, 31 March 2019 10:19:20 UTC-7, Jim S wrote: > > I changed

[web2py] Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid?

2019-04-01 Thread Val K
Create view in sqlite "CREATE VIEW your_tbl_name AS SELECT ..." using executesql and define corresponding web2py table with migrate=False, fake_migrate=True -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code

Re: [web2py] Re: Click the update web2py button in Python Anywhere (PA) leads to crash.

2019-04-01 Thread Ron Chatterjee
This is a bigger problem than space X On Monday, April 1, 2019 at 8:45:56 AM UTC-4, Nico Zanferrari wrote: > > Hi Ron, > > so there should be other problems... Take a look here > https://www.pythonanywhere.com/forums/topic/7669/ , it shows you how to > change the password, reload web2py from s

[web2py] Re: Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Ron Chatterjee
I did. They said its lot of work to change from 2.14 to any newer version and they don't have time. On Monday, April 1, 2019 at 7:27:23 PM UTC-4, Scott Hunter wrote: > > Shouldn't you ask them? > > On Monday, April 1, 2019 at 8:57:21 AM UTC-4, Ron Chatterjee wrote: >> >> Does anyone know why py

[web2py] Re: Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Scott Hunter
Shouldn't you ask them? On Monday, April 1, 2019 at 8:57:21 AM UTC-4, Ron Chatterjee wrote: > > Does anyone know why python anywhere only give option for 2.15 edition of > web2py? If I have to guess that's few years old. I asked the question > because I am not sure if they believe 2.15 is more s

[web2py] Re: How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-01 Thread Scott Hunter
This part of the web2py book might help: http://www.web2py.com/book/default/chapter/06#sum-avg-min-max-and-len On Monday, April 1, 2019 at 6:41:51 PM UTC-4, João Matos wrote: > > Hello, > > I have this SELECT in SQLite > > result = db.executesql( > "SELECT auth_user.id, auth_user.

[web2py] How can I convert a SUM from a SQLite SELECT statement to web2py's DAL?

2019-04-01 Thread João Matos
Hello, I have this SELECT in SQLite result = db.executesql( "SELECT auth_user.id, auth_user.username, " "auth_user.canceled_on, " "auth_user.canceled_by, " "SUM(auth_group.role = 'Operador') operador, " "SUM(auth_group.role = 'Verifi

[web2py] Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid?

2019-04-01 Thread João Matos
Hello, Is it possible to show the results from a SELECT (made with SQLite using db.executesql) in a grid? I have this result = db.executesql( "SELECT auth_user.id, auth_user.username, " "auth_user.canceled_on, " "auth_user.canceled_by, " "SUM(

Re: [web2py] Re: Not my type

2019-04-01 Thread Al Hart
Hi Joe (sorry for delay, I took the weekend off. BTW, on a totally different note, why is the date showing March 29 on last reply??), Yes, you're absolutely right, it's a Python version thing. I started my session in Python 3.x and so the examples in the web2py book weren't working as it seems

Re: [web2py] UnicodeDecodeError('utf-8' codec can't decode byte 0xf8 in position 4: invalid start byte)

2019-04-01 Thread Maurice Waka
Just noted that one of my files was corrupted. Problem solved Regards On Mon, 1 Apr 2019, 14:50 Maurice Waka wrote: > I have started getting this error when opening a page: > > Traceback > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > 10. > 11. > 12. > 13. > Traceback (most recent call last):

Re: [web2py] Re: Redis and Python3?

2019-04-01 Thread Jim S
Ok, how about this for a fix: I inserted the following at lines 147 and 225 in gluon/contrib/redis_session.py. kwargs['locked'] = str(kwargs['locked']) kwargs['modified_datetime'] = str(kwargs['modified_datetime']) Any redis_session experts out there that can help with this? My understanding

[web2py] Why python anywhere stuck with web2py 2.15 version

2019-04-01 Thread Ron Chatterjee
Does anyone know why python anywhere only give option for 2.15 edition of web2py? If I have to guess that's few years old. I asked the question because I am not sure if they believe 2.15 is more stable for 2.18. Is any reason they use an older version of web2py? -- Resources: - http://web2py.c

Re: [web2py] Re: Click the update web2py button in Python Anywhere (PA) leads to crash.

2019-04-01 Thread Nico Zanferrari
Hi Ron, so there should be other problems... Take a look here https://www.pythonanywhere.com/forums/topic/7669/ , it shows you how to change the password, reload web2py from scratch with git and even change the python version used. Nico Il giorno lun 1 apr 2019 alle ore 14:14 Ron Chatterjee < a

Re: [web2py] Re: Click the update web2py button in Python Anywhere (PA) leads to crash.

2019-04-01 Thread Ron Chatterjee
Nico, I have done the reload. Didn't work. What I have done is opened a new app. Unfortunately, if I create a app through PA it still load an old version of web2py (2.14). So, I needed to delete that and download a new source file. I did the reload. But when I tried to access the site I get an

[web2py] UnicodeDecodeError('utf-8' codec can't decode byte 0xf8 in position 4: invalid start byte)

2019-04-01 Thread Maurice Waka
I have started getting this error when opening a page: Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last): File "/home/mauricewaka/web2py/gluon/main.py", line 444, in wsgibase serve_controller(request, response, session) File "/home/mauricewaka/web2py/gluon

[web2py] Testing testing...

2019-04-01 Thread António Ramos
Hello all what is the best way to test modules? also why nobody talks about tests in web2py when in every other framework they do it from the beggining. For starters its less noisy but when app grows we eventually need testing skills or we are doomed... PS i saw pytest with web2py and it seems the