[web2py] Re: scheduler processes cooperation issue

2016-09-29 Thread Pierre
I am starting the workers/sched processes with this : python web2py.py -a 'password' -K appname,appname and the tasks are queued in a controller function then . Tasks use module functions As far as I understand ret = db.validate_and_insert(fa='something',fb='somethingelse') is not supposed to

[web2py] Re: how to do 2 step verification authentication????

2016-09-29 Thread Marlysson Silva
Which error appears? Em quarta-feira, 28 de setembro de 2016 16:13:05 UTC-3, prashant joshi escreveu: > > how configure email?? > i do according to the book but it not work... > > please anyone tell me another method??? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: How to restrict access to a public webservice using a key?

2016-09-29 Thread Lisandro
Thanks Niphlod, nice and clean solution. I was trying to just that, but I was trying to validate that token using the decorator @auth.requires(lambda: validate_token()) for the call() method, but it always returned a 303 code. I also tried with a custom decorator, with no luck. Anyway, your sug

Re: [web2py] Re: Fresh install, getting error: table "auth_user" already exists

2016-09-29 Thread Richard Vézina
Check files owner, should be www-data recursively if you are in prod under ubuntu... On Thu, Sep 29, 2016 at 1:33 AM, pbreit wrote: > Appears to be a permissions issue as it goes away if I start web2py with > sudo. > > > On Wednesday, September 28, 2016 at 10:15:18 PM UTC-7, pbreit wrote: >> >>

[web2py] Re: scheduler processes cooperation issue

2016-09-29 Thread Pierre
very confusing situation problem has been addressed long time ago: https://groups.google.com/forum/?fromgroups#!topicsearchin/web2py/race$20condition;context-place=forum/web2py/web2py/Z581Pk3RCYI/web2py/Z581Pk3RCYI what I observe is that transaction logic doesn't work as expected in the followin

[web2py] SQLFORM key error on simple table with one record

2016-09-29 Thread Peter
I'm punch drunk from looking at this one! Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. Traceback (most recent call last): File "/home/peter/web2py/gluon/restricted.py", line 227, in restricted exec ccode in environment File "/home/peter/web2py

[web2py] Re: how to do 2 step verification authentication????

2016-09-29 Thread Dave S
On Wednesday, September 28, 2016 at 12:13:05 PM UTC-7, prashant joshi wrote: > > how configure email?? > i do according to the book but it not work... > > please anyone tell me another method??? > If you''re using gmail, getting around 2-step authentication involves having the account app-enab

[web2py] Re: scheduler processes cooperation issue

2016-09-29 Thread Dave S
On Thursday, September 29, 2016 at 8:54:20 AM UTC-7, Pierre wrote: > > very confusing situation > problem has been addressed long time ago: > > > https://groups.google.com/forum/?fromgroups#!topicsearchin/web2py/race$20condition;context-place=forum/web2py/web2py/Z581Pk3RCYI/web2py/Z581Pk3RCYI >

[web2py] Re: scheduler processes cooperation issue

2016-09-29 Thread Niphlod
ha: yep, the logic is totally flawed. You can't be sure your task has been correctly processed just by queueing it. The task DOESN'T obviously run in the same transaction the webpage displaying the form is. On Thursday, September 29, 2016 at 5:54:20 PM UTC+2, Pierre wrote: > > very confusing sit

[web2py] Re: How to restrict access to a public webservice using a key?

2016-09-29 Thread Niphlod
everything in auth has underlying defaults to have an entity (usually, the user) to authenticate. if it's not authenticated, then it's usually redirected to the login page. see auth.requires signature in deep if you want to use it as a standard "block this if this condition isn't met" style-dec

[web2py] Re: SQLFORM key error on simple table with one record

2016-09-29 Thread Anthony
Is your version of pydal the one that goes with your version of web2py? On Thursday, September 29, 2016 at 12:05:14 PM UTC-4, Peter wrote: > > I'm punch drunk from looking at this one! > > Traceback > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > 10. > 11. > 12. > 13. > 14. > 15. > 16. > 17. > 1

[web2py] Re: how to do 2 step verification authentication????

2016-09-29 Thread Niphlod
I think he's referring to two-step verification On Thursday, September 29, 2016 at 8:05:11 PM UTC+2, Dave S wrote: > > > > On Wednesday, September 28, 2016 at 12:13:05 PM UTC-7, prashant joshi > wrote: >> >> how configure email?? >> i do according to the book but it not work... >> >> please anyon

[web2py] Re: SQLFORM key error on simple table with one record

2016-09-29 Thread Peter
Thanks Anthony, Not sure how to confirm that but what I can say, web2py is running on Linux and I found... - The file ~/web2py/gluon/packages/dal/CHANGESrefers to 'Version 16.03' The web2py site reports... - 2.14.6-stable+timestamp.2016.05.10.00.21.47 (Running on Rocket

[web2py] Sum issues while computing the total of a table field

2016-09-29 Thread Oasis Agano
Greetings im trying to perform a sum query that calculates the total gross(float) so that i can pass it to the view but im getting the error described in the traceback; i tried this https://groups.google.com/forum/#!searchin/web2py/sum/web2py/paz06IC3slo/13Lj3tErj8EJ but no clue *Traceback*

[web2py] Re: Sum issues while computing the total of a table field

2016-09-29 Thread stifan kristi
pls try : query = (db.payslip.state == 'Confirmed') sum = db.payslip.gross.sum() print db(query).select(sum).first()[sum] *ref:* http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#sum--avg--min--max-and-len best regards, stifan -- Resources: - http://web2py.com - http:

[web2py] Re: SQLFORM key error on simple table with one record

2016-09-29 Thread Peter
Just realised that the traceback shows web2py is using the system installed python pydal /usr/local/lib/python2.7/dist-packages/pydal all the files under this are dated May 17 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sour

[web2py] modify default scaffolding (welcome app) welcome user logged in (top right)

2016-09-29 Thread 黄祥
in web2py default scaffolding app (welcome app), when user logged in in top right there is auth.navbar that said : 'Welcome user_logged_in_first_name' is it possible to change it? e.g. 'Welcome user_logged_in_first_name user_logged_in_last_name' or 'Welcome user_logged_in_user_name' i've chec

[web2py] Re: SQLFORM key error on simple table with one record

2016-09-29 Thread Anthony
Yes, noticed that in the traceback -- that's why I asked -- assumed you were using that version intentionally (web2py defaults to the system installed pydal, as seen here ). I think the current web2py is using an earlier versio

[web2py] Re: SQLFORM key error on simple table with one record

2016-09-29 Thread Peter
I created a duplicate table db.payment2 which gave the same error so I went through the fields one by one... This one change in the table definition avoids the Traceback and the form displays as expected! Field( 'invoice_ref' ), Applied the same change to the original and it now opens the

[web2py] Re: SQLFORM key error on simple table with one record

2016-09-29 Thread Peter
On Friday, 30 September 2016 03:04:17 UTC+1, Anthony wrote: >> >> Yes, noticed that in the traceback -- that's why I asked -- assumed you >> were using that version intentionally (web2py defaults to the system >> installed pydal, as seen here >>