[web2py] Re: Automatic user logout & redirect

2019-08-19 Thread Paco Bernal
redirect(URL('index'), 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 the

[web2py] Re: Automatic user logout & redirect

2019-08-19 Thread mostwanted
Another issue i am facing with redirecting is here, i am using ajax to take the registration key from the user to a controller, what is supposed to happen is that if the registration key is valid the user should be redirected to another page allowing them normal application usage. The

[web2py] Re: Automatic user logout & redirect

2019-08-19 Thread mostwanted
WOOOW, you saved my life @Val K, a million thanks, that was curelessness on my part, sometimes one gets so tired you miss the obvious. I modified the code to this & it works, thank you again. import datetime def index(): exp_date=db(db.expiry_date_table).select() for exp_d in exp_date:

[web2py] Re: Automatic user logout & redirect

2019-08-19 Thread Val K
There is no 'select' in your code. Is that a typo? -- 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

[web2py] Re: Automatic user logout & redirect

2019-08-19 Thread mostwanted
So I decided to give my problem a try, here is the code: import datetime def index(): current_date = request.now - datetime.timedelta(days=0) if db(db.expiry_date_table.expiry_date < current_date ): redirect(URL('subscribe')) return locals() But now the problem is that its