[web2py] Re: using before and after update callback simultaneously on the same table

2017-08-18 Thread 黄祥
thanks leonel for the hints, find the solution with update_naive, because the logic for the real code is to recalculate the order table when it's update e.g. use update_naive def __after_update_order(s, f): if not ('is_active' in f and f['is_active'] == False): s.update_naive(notes = 'test') fro

[web2py] Re: troubles with scheduler

2017-08-18 Thread Dave S
On Friday, August 18, 2017 at 2:37:46 AM UTC-7, Mirek Zvolský wrote: [... useful info elided ...] > So the evil is to let the pg8000-obsolete in contrib/ in current Web2py > release.This should change: > - or update Web2py release to current pg8000, > - or remove the pg8000 from Web2py release

Re: [web2py] Re: book help

2017-08-18 Thread Dave S
On Thursday, August 17, 2017 at 6:02:31 AM UTC-7, Richard wrote: > > No... Hmm... Use Github oneline, you should have button beside your branch > like "Create a PR" or something like that... It weird that you github > desktop porpose you to create a PR against you own repo... I guess your > se

{Disarmed} Re: {Disarmed} [web2py] Re: pytest and controllers protected with auth

2017-08-18 Thread Carlos Cesar Caballero Díaz
I have been facing with that issue too, the error is because there are no logged in user, and the redirect is raised, the main problem with this approach is that I have been not able to correctly log in a user... Being honest, I haven't found a satisfactory way for testing web2py applications.

[web2py] Re: auth_cas redis session_filename + logout issue

2017-08-18 Thread Mark Graves
On deeper inspection, the logout issue is strange, and related to the redis sessions. auth.settings.login_form.cas_logout_url is the right URL. If I visit it independently in a browser it works as expected. However, there are no auth_users created in the cas_consumer app when redis session

[web2py] Re: pytest and controllers protected with auth

2017-08-18 Thread António Ramos
anybody help please ? regards 2017-08-18 15:20 GMT+01:00 António Ramos : > this does not work. > > *@auth.requires(True, requires_login= request.is_local)* > def execdal(): > return dict(ret=1) > > > my pytest function > def test_execdal(web2py): > result = web2py.run('default', 'execdal',

[web2py] Re: pytest and controllers protected with auth

2017-08-18 Thread António Ramos
this does not work. *@auth.requires(True, requires_login= request.is_local)* def execdal(): return dict(ret=1) my pytest function def test_execdal(web2py): result = web2py.run('default', 'execdal', web2py) i get an error about redirected [image: Imagem inline 1] 2017-08-18 12:46 GMT+01:0

[web2py] Re: Datatables Query String Parsing

2017-08-18 Thread Val K
Hi, I did something similar that what are looking for jq_param2storage_w2p.py usage in controller: paresd_vars = jq_param_w2p(request.body) On Thursday, July 27, 2017 at 5:01:13 PM UTC+3, villas wrote: >

[web2py] change_password validator

2017-08-18 Thread tomasz bandura
Hello, For the user registration I use just default validator (IS_STRONG) which has defined only minimum lenght (4). The problem is during password changing (form=auth() --> default/user/change_password) - validator is ignored and I can set password with length=1 Should I set a validator separa

[web2py] pytest and controllers protected with auth

2017-08-18 Thread António Ramos
Hello i+m testing a controller with pytest if my controller is protected like @auth.requires.login or @auth.requires_membership how can i test it ? def test_controller(client): client.get('/default/controller') ... ... Regards -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: cx_Oracle 6.0

2017-08-18 Thread Вячеслав Анатольевич
Thanks, Leonel! It works! -- 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 "web2

[web2py] Re: cx_Oracle 6.0

2017-08-18 Thread Leonel Câmara
Nope, that's caused by the new entity quoting in the DAL. Use entity_quoting=False in your DAL call. -- 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

[web2py] cx_Oracle 6.0

2017-08-18 Thread Вячеслав Анатольевич
Hi everyone! Actually the question on the topic! Do you need changes to pydal or we2py due to the release of cx_Oracle 6.0? Release web2py 2.15.3 took place a week earlier than cx_Oracle 6.0. I ask - because it creates parallel tables with already existing only with a small (or large) letter, w

[web2py] Re: troubles with scheduler

2017-08-18 Thread Mirek Zvolský
I have on development machine: psycopg2,pg8000 - psycopg2 accidentally from other project. On production I have the standard Web2py installation only --> and this means: pg8000-obsolete. I run scheduler task for import (about 3 records in central table + some smaller related tables). I can

[web2py] Re: using before and after update callback simultaneously on the same table

2017-08-18 Thread Leonel Câmara
It's possible, but not if they're doing what yours are. Namely the problem here is not that you have a before and after update callback. The problem is your __after_update_order. Your __after_update_order updates table *order* which triggers __after_update_order again. This would be ok if you h

[web2py] using before and after update callback simultaneously on the same table

2017-08-18 Thread 黄祥
is it possible to using before and after update callback simultaneously on the same table? tested before but got an error traceback *e.g.* def __before_update_order(s, f): query = (db.product.id == 1) db(query).update(quantity = 9) def __after_update_order(s, f): if not ('is_active' in f and f['i