Re: [web2py] Why these functions don't work in web2py

2018-06-27 Thread Maurice Waka
I tested it with return. It's now works but takes to long to respond. Let me work on the code. Regards On Wed, 27 Jun 2018, 00:49 Anthony wrote: > Note, Idle is not giving you a return value - the function is simply > printing the output, which Idle displays. Of you want a return value, you > mu

Re: [web2py] Re: 403 Forbidden?

2018-06-27 Thread Yebach
I have a similar problem I am running web2py on windows 10 machine on azure. When I insert URL someurladdress.si I get an error 403, but If I insert someurladdress.si:8000/bilbanstevci it all works fine. Any suggestions? My web2py start line is python web2py.py -i 0.0.0.0. -a pass If I added

[web2py] Fwd: multiple SUM IF in a single DAL

2018-06-27 Thread Al Ex
It seems it did not show up in the list yet. On June 22, 2018 at 16:46:48, Al Ex (a22...@gmail.com) wrote: Is there a way to translate into a single DAL this sql query? SELECT SUM(IF(is_a = 'T',1,0)) as a, SUM(IF(is_b = 'T',1,0)) as b FROM table; It counts the times is_a and is_b are True

[web2py] Re: Infinite loading

2018-06-27 Thread Leonel Câmara
Do you mean that as you scroll more results are loaded? This isn't really a web2py problem, it's a matter of implementing it in javascript. On the web2py side it's a matter of paging the results and the javascript increases the page number it requests from web2py each time it needs more results

Re: [web2py] Re: dependencies inside 'static' folder

2018-06-27 Thread Jon Subscripted
Thanks for your response Anthony, I'll try what you suggest. On Sun, Jun 24, 2018 at 5:20 AM, Anthony wrote: > On Saturday, June 23, 2018 at 11:05:35 PM UTC-4, Jonsubs wrote: >> >> Hi everyone, >> I'm a web2py newbie and I'm trying to use a third party JS library >> (chessboard.js from http://ww

[web2py] Re: Recaptcha

2018-06-27 Thread Leonel Câmara
Change: from gluon.tools import Recaptcha To: from gluon.tools import Recaptcha2 as Recaptcha -- 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 rece

Re: [web2py]: Empty dropdown value

2018-06-27 Thread Leonel Câmara
Or simply set zero=False and it will be the first option. -- 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 subscr

Re: [web2py]: Empty dropdown value

2018-06-27 Thread Anthony
On Wednesday, June 27, 2018 at 9:45:30 AM UTC-4, Leonel Câmara wrote: > > Or simply set zero=False and it will be the first option. > If you want to exclude that first option, it should be zero=None. Setting zero=False will still show a blank first option, but simply assign the value False if it

Re: [web2py] Re: customize requires in DB

2018-06-27 Thread Diego Tostes
Hi Anthony, i think that put the requires make my code more organized ... But it is a personal choice. I did changes in my tables and now i have: Clientes = db.define_table('clientes', Field('cnpj', 'string', label=T("CNPJ")), Field('nome_cliente', 'string', label=T("Cliente")), Fie

Re: [web2py] Re: customize requires in DB

2018-06-27 Thread Diego Tostes
*Pedido.*ordem_servico_id*.requires = IS_IN_DB(Ordem_Servico), 'ordem_servico.id ',* *lambda r: '%s - os: %s' % (r.ordem_servico_id.produto_id.cliente_id.nome_cliente,* * r.ordem_servico_id.iden

Re: [web2py] Re: customize requires in DB

2018-06-27 Thread Anthony
> > *Pedido.produto_id.requires = IS_IN_DB(Ordem_Servico), 'ordem_servico.id > ',* > *lambda r: '%s - os: %s' % > (r.ordem_servico_id.produto_id.cliente_id.nome_cliente,* > *

Re: [web2py] Re: Handling "Invalid function", "Invalid request", "Invalid controller"

2018-06-27 Thread Christian Varas
Thank you, i will try this. Cheers. Chris. 2018-06-26 21:47 GMT-04:00 黄祥 : > perhaps this link can be used: > http://www.web2pyslices.com/slice/show/1529/custom-error-routing > > best regards, > stifan > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http:

[web2py] Re: Infinite loading

2018-06-27 Thread Dave S
On Wednesday, June 27, 2018 at 6:33:28 AM UTC-7, Leonel Câmara wrote: > > Do you mean that as you scroll more results are loaded? This isn't really > a web2py problem, it's a matter of implementing it in javascript. On the > web2py side it's a matter of paging the results and the javascript >

[web2py] Re: Recaptcha

2018-06-27 Thread Alby Cartner
You are a legend - Worked right off. Thank you. On Thursday, June 28, 2018 at 1:44:28 AM UTC+12, Leonel Câmara wrote: > > Change: > > from gluon.tools import Recaptcha > > > To: > > from gluon.tools import Recaptcha2 as Recaptcha > > -- Resources: - http://web2py.com - http://web2py.com/book (D

Re: [web2py]: Empty dropdown value

2018-06-27 Thread Gaurav Shet
Thank you guys! Zero=None works for me perfectly :) On Wed, Jun 27, 2018 at 8:13 PM Anthony wrote: > On Wednesday, June 27, 2018 at 9:45:30 AM UTC-4, Leonel Câmara wrote: >> >> Or simply set zero=False and it will be the first option. >> > > If you want to exclude that first option, it should b