[web2py] Re: Postgres migration errors

2018-08-01 Thread Rahul
Hi Anthony, Yes there are many queries that are being fired - Since it is a dashboard I have multiple queries being fired sequentially/simultaneously. I have a number of those queries in try catch block as well. I certainly agree that rolling back is not a good solution and in-fact I am in

[web2py] Re: non-SMS 2FA

2018-08-01 Thread Anthony
On Wednesday, August 1, 2018 at 7:45:57 PM UTC-4, Alex Glaros wrote: > > I've read that two-factor authorization using SMS is insecure > > . > Not so much that it is insecure, but less secure than some other

[web2py] non-SMS 2FA

2018-08-01 Thread Alex Glaros
I've read that two-factor authorization using SMS is insecure . Is there available, or has anyone installed google authentictor or authy on their sites? thanks Alex Glaros -- Resources: - http://web2py.c

[web2py] Help with CAS logout

2018-08-01 Thread fiubarc
Hello, I am wanting to implement CAS, but during the tests, when I close session in the "provider" application it does not close the session in the rest of the "consumers" applications. I have several applications distributed on several servers and the CAS application on a separate server. T

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Anthony
By the way, why do you want to use cache.action for a non-action? Even if this is an Ajax request, can't you still decorate the action that receives the request? If you only want to cache part of the generated response, then why not just use current.cache.ram, etc.? Anthony On Wednesday, Augus

[web2py] Re: Postgres migration errors

2018-08-01 Thread Anthony
On Wednesday, August 1, 2018 at 8:48:54 AM UTC-4, Rahul wrote: > > Hi Anthony, > I used *db.rollback**()* and viola - A lot of my failing stuff > started to work. I am rectifying the failing queries and still trying to > figure out the incorrect SQL statement that is causing the error. F

[web2py] Re: update_or_insert doesn't always return the corresponding row id

2018-08-01 Thread Anthony
On Wednesday, August 1, 2018 at 6:46:09 AM UTC-4, Matthew J Watts wrote: > > Hi all > > I'm having the same problem, i'm trying to return an ID after an > 'update_or_insert', but I need the ID whether it inserts or updates to add > as a forign key to a related table. > Yes, the workaround is sim

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Anthony
Sorry, didn't realize you were trying to decorate a method. cache.action is designed to cache controller actions, so it is not expecting to decorate any functions that take arguments (methods always take at least the self argument). On Wednesday, August 1, 2018 at 4:27:02 AM UTC-4, Joe Barnhart

[web2py] Re: Multi language SEO fro web2py rewrite rules example please

2018-08-01 Thread Anthony
On Tuesday, July 31, 2018 at 11:36:53 PM UTC-4, rāma wrote: > > > Based on recommendations of a muli-lingual site here: > https://stackoverflow.com/a/16624252 > > Ther

[web2py] Re: Two or more variables in function ajax()

2018-08-01 Thread Константин Комков
Full view if you want: Проверка электронной почты Я являюсь гражданином Российской Федерации и даю своё согласие на обработку персональных данных. E-mail:

[web2py] Two or more variables in function ajax()

2018-08-01 Thread Константин Комков
1. Can I send two or more variables in function ajax()? In the book I saw parameters of ajax function: ajax(url, [name1, name2, ...], target) As I understand name1 and name2 it's variables. 2. There is way to send only one variable (email), if checkbox cheked, from my form (view below)? 3. If I

[web2py] Re: Postgres migration errors

2018-08-01 Thread Rahul
Hi Anthony, I used *db.rollback**()* and viola - A lot of my failing stuff started to work. I am rectifying the failing queries and still trying to figure out the incorrect SQL statement that is causing the error. For below question - Again if I print db.rollback() a *None* is returned.

[web2py] Re: update_or_insert doesn't always return the corresponding row id

2018-08-01 Thread 'Matthew J Watts' via web2py-users
Hi all I'm having the same problem, i'm trying to return an ID after an 'update_or_insert', but I need the ID whether it inserts or updates to add as a forign key to a related table. Does anyone have a work around, someone mentioned that you could just 'db(condition).select(table.id) after th

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Joe Barnhart
Ah, well. It seems a bit beyond me. I think it's failing because I'm caching a bound instance method (i.e. has "self"). I get "wrapped+_f takes no arguments, 1 given)". def lazy_cache_action(time_expire=DEFAULT_TIME_EXPIRE, cache_model=None, prefix=None, session=False, vars=True, l

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Joe Barnhart
Oops, I meant of course; current.cache.action instead of current.cache On Wednesday, August 1, 2018 at 12:48:00 AM UTC-7, Joe Barnhart wrote: > > You're a fountain of ideas! I missed that one in the book. > > I wonder if this would work. Off to go try it... > > def lazy_cache_action(self,

[web2py] Re: Using cache.action in a module

2018-08-01 Thread Joe Barnhart
You're a fountain of ideas! I missed that one in the book. I wonder if this would work. Off to go try it... def lazy_cache_action(self, time_expire=DEFAULT_TIME_EXPIRE, cache_model=None, prefix=None, session=False, vars=True, lang=True, user_agent=False, public=True, vali