[web2py] Return Storage as json causes 'NoneType' object is not callable

2019-05-22 Thread Val K
Solved, it is a gluon bug, should be: if hasattr(s, 'as_list') and s.as_list: -- 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

[web2py] Re: 2.18.5 admin UnicodeDecodeError

2019-05-22 Thread Jacinto Parga
El jueves, 25 de abril de 2019, 11:00:49 (UTC+2), Jacinto Parga escribió: > > Hi, It suddenly appeared. Version downloaded from source web. The same > with github version. > > Error ticket for "admin" Ticket ID > > 127.0.0.1.2019-04-25.10-45-30.ec4c021c-532a-46c7-a8cd-6f9356fc7ab7 > 'ascii'

[web2py] Re: 2.18.5 admin UnicodeDecodeError

2019-05-22 Thread Jacinto Parga
Yes I had to clear the sessions. There is an issue when you start sessions in chrome width different users. Thanks El jueves, 25 de abril de 2019, 23:55:48 (UTC+2), João Matos escribió: > > Did you change the Python version? Check your path. > Also, if clearing the sessions and errors doesn't

[web2py] Recaptcha V3 in auth.login form

2019-05-22 Thread Jacinto Parga
I have tried recaptcha v3 width auth login form but something is wrong. It seems to break the basic auth validation methods. Controller def user(): form = auth() my_captcha_element = TR(INPUT(_name='recaptcharesponse', value='', _type='hidden', _id='g-recaptcha-response'))

[web2py] More then one buttons on form

2019-05-22 Thread Константин Комков
Web2py automatically add event listeners and class="btn" for button. What if my form contain more then one button or I don't want use that class? Usually I have used input type="button" in that case, but now text in my button may contain 2 rows and I can't use input becouse it inline element.

[web2py] Re: Custom validator that avoids saving duplicate / similar values on a database with custom forms

2019-05-22 Thread mostwanted
Nice one, Thanks alot On Monday, May 20, 2019 at 1:50:18 PM UTC+2, Leonel Câmara wrote: > > Valitadors have an error_message __init__ argument. So you can just do > IS_IN_DB(..., error_message=T('*that name is already used, please choose > a different name for your items*')) > -- Resources: -

[web2py] Re: Web3py

2019-05-22 Thread 黄祥
tested commit (123), need to create folder databases on examples webapp (mkdir apps/examples/databases) *phase 1 ([FAILED] loading examples)* rm -rf /tmp/* rm -rf web3py git clone https://github.com/web2py/web3py cd web3py pip3 install -U -r requirements.txt $ ./web3py-start apps ___

[web2py] Redirect to new page from ajax request

2019-05-22 Thread Константин Комков
Hello! I use ajax request and in one case of 10 I need redirect user to another page. Can I redirect user on server or I need return link in ajax answer to js, and then redirect user? Now if I use redirect on server redirecting page was loaded in console. -- Resources: - http://web2py.com -

[web2py] OOT: bandit

2019-05-22 Thread 黄祥
pardon, not sure, this thread proper or not here, tested web2py and web3py with bandit *steps* pip3 install bandit cd git clone https://github.com/web2py/web3py git clone https://github.com/web2py/web2py $ bandit web3py/*.py -r [main] INFOprofile include tests: None [main] INFOprofile

[web2py] Can I use my function like decorator?

2019-05-22 Thread Константин Комков
Can I use my function like decorator? How take access for pages? def emailConfirmed(): if session.abit_email is None: redirect(URL('default','index')) else: confirmed = db_xml((db_xml.abit_validation_codes.A_EMAIL==session.abit_email) &

[web2py] Re: SQL ALL & ANY operators - ?

2019-05-22 Thread Константин Комков
I don't know about ANY, but it was told about ALL http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#_lastsql -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Redirect to new page from ajax request

2019-05-22 Thread Leonel Câmara
you can use redirect(URL(..), client_side=True) -- 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

[web2py] Re: Can I use my function like decorator?

2019-05-22 Thread Leonel Câmara
Note that decorators need a function as an argument and should return another function, given that knowledge you just need to change your function a bit def emailConfirmed(fun): def decorated(): if session.abit_email is None: redirect(URL('default','index'))

[web2py] Re: More then one buttons on form

2019-05-22 Thread Константин Комков
I use two forms now as I think it is not good. After button was pushed height of them was changed (btns.png). -- 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: Https Apache Problem

2019-05-22 Thread lucas
Massimo is very correct on using nginx. I used apache for decades and nginx is simpler to configure and serves up http requests at twice the speeds. literally what used to be an average of 100-120ms under apache, changed to 40-55ms under nginx for the same exact code under web2py. On

[web2py] Re: production - db migration issue. Works in sqlite but not mysql

2019-05-22 Thread João Matos
Don't use MySQL but try setting the migrate=False in the DAL creation (usually in models/db.py). And add migrate=True to all your own tables (eg. products). quarta-feira, 15 de Maio de 2019 às 12:53:05 UTC+1, Ron Chatterjee escreveu: > > > Hello all, > > In PA I am running this app with an

[web2py] Using a recursive select but encountered a broken reference

2019-05-22 Thread Carlos Cesar Caballero Díaz
Hi guys, I have some weird issue here, I have a "Using a recursive select but encountered a broken reference" error in a field wish seems to have a valid reference. This is happening with a very specific record in a MySQL database. Any Idea? Greetings. -- Resources: - http://web2py.com -

[web2py] Re: SQL ALL & ANY operators - ?

2019-05-22 Thread João Matos
That ALL ( http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#_lastsql) is web2py

[web2py] Re: Using a recursive select but encountered a broken reference

2019-05-22 Thread Leonel Câmara
Are you using common filters? -- 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

Re: [web2py] Re: Using a recursive select but encountered a broken reference

2019-05-22 Thread Carlos Cesar Caballero Díaz
No, I have just found the issue, I am using record versioning in tables, and the child record was removed, this does not trigered the cascade, so, the parent record was not removed and the recursive select was failing when tries to access to a "deleted" record. Greetings. El 22/5/19 a las

[web2py] Re: Https Apache Problem

2019-05-22 Thread João Matos
I use Apache with HTTPs on Windows systems. Do you have an error? quarta-feira, 15 de Maio de 2019 às 06:28:55 UTC+1, Cris Fad escreveu: > > Hello, > > I am trying to run w2p on apache. I do so by running the script > setup-web2py-ubuntu.sh in the folder web2py/scripts. It works fine for the

[web2py] Re: More then one buttons on form

2019-05-22 Thread João Matos
See the doc http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=Adding+buttons+to+FORMs#Adding-buttons-to-FORMs quarta-feira, 22 de Maio de 2019 às 09:12:19 UTC+1, Константин Комков escreveu: > > Web2py automatically add event listeners and class="btn" for button. What >

Re: [web2py] Re: SQL ALL & ANY operators - ?

2019-05-22 Thread Eliezer (Vlad) Tseytkin
Yeah, I was just hoping for some extra convenience :) Thank you! On Wed, May 22, 2019, 11:59 AM Leonel Câmara wrote: > No. But you can use belongs to do the same thing. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py

[web2py] Re: SQL ALL & ANY operators - ?

2019-05-22 Thread Leonel Câmara
No. But you can use belongs to do the same thing. -- 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

Re: [web2py] Re: SQL ALL & ANY operators - ?

2019-05-22 Thread Eliezer (Vlad) Tseytkin
Oh, I was asking about these: https://www.w3schools.com/sql/sql_any_all.asp On Wed, May 22, 2019, 9:15 AM Константин Комков wrote: > I don't know about ANY, but it was told about ALL > http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#_lastsql > > -- >

Re: [web2py] More then one buttons on form

2019-05-22 Thread Christian Varas
Hi, well what I do to change some attributes in the forms is modifiying the form before to be returned/rendered: You can access to the elements in the form like a list Ex: form = SQLFORM.factory(Field('hoho'), Field('haha') )

[web2py] Re: OOT: bandit

2019-05-22 Thread 黄祥
prev message, not scan recursively, tried to scan web2py take longer time, n think it can ignore the result under apps folder since it's just a scaffolding or examples, but can be a reminder when deploy in production $ bandit ./web3py/ -r [main] INFOprofile include tests: None [main] INFO

[web2py] A little suggestion: Create a forum for web3py

2019-05-22 Thread Daniel Guilhermino
Hi, I believe that over time the web2py/web3py forum mixing the two frameworks in the same place will be very polluted and probably will even create confusion for users. I would like suggest setting up a specific forum for web3py. Best regards, Daniel Guilhermino -- Resources: -

[web2py] web2py on Raspbian and Python 2 or 3?

2019-05-22 Thread lucas
hello one and all, yes, I have web2py 2.17.2 running on a raspberry pi model 3 b+, raspbian is its OS, as a server for my students to mess up. on this "server", under nginx 1.10.3, web2py is currently using python 2.7.13. but raspbian has both python 2 (2.17.13) and 3, specifically 3.5.3. I