[web2py] Re: reCaptcha in China

2019-10-11 Thread Gaël Princivalle
The only solution I've found is adding a simple field like that: Field('no_spam', requires=IS_EQUAL_TO('4',error_message=T('Must be 4')), type='integer', label=T('2 + 2 ='), comment=T('Are you human?')) Probably too simple but I don't have yet a better solution. Il giorno lunedì 23 settembre 201

[web2py] Re: Bugfixes for older versions of Web2Py?

2019-10-11 Thread villas
You should update to the latest version. In my experience, trying to do anything else will, in the long term, waste more time and effort (and be insecure). One of the main features of web2py is that it is backward-compatible. On Friday, 11 October 2019 06:38:52 UTC+1, Bruno Heremans wrote:

[web2py] Re: Where do we place the routes.py file?

2019-10-11 Thread villas
'Reload Routes' button is at top right on main admin screen. Please read docs, you can simply search for routes, e.g.: http://www.web2py.com/books/default/chapter/29/04/the-core?search=routes#URL-rewrite -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Calculating the number of days from given dates givesa null value!

2019-10-11 Thread mostwanted
I am lost for words & a-little infuriated at this point, a formula that has been working & is working in other applications is not working today when applied to another app!! I am simply trying to get the number of days from the given dates but the formula gives a NONE value! But i have applied

[web2py] Re: Error trying to go back to python 2 after testing python 3: TypeError: translate() takes exactly one argument (2 given)

2019-10-11 Thread Lisandro
> Also in your json example you are getting unicode both in py2 and py3 except py3 does not put the u'' in front of unicode strings because they are default. I've used type() to inspect the keys and values of the dictionary in py2 and py3: *py2* >>> map = pickle.load(open(path, 'rb')) >>> firs

[web2py] Deploy site erro, unrecovery

2019-10-11 Thread Kimus
Bom dia, estou com um mega problema. preciso fazer um deploy urgente pra subir um site que fiz com web2py, segui os passos do blog do link: https://juliarizza.wordpress.com/2016/01/19/passo-a-passo-web2py-7o-e-ultimo-passo/ só que algo ta dando errado pq quando tento acessar o link aparece ess

[web2py] Re: Error trying to go back to python 2 after testing python 3: TypeError: translate() takes exactly one argument (2 given)

2019-10-11 Thread Lisandro
Well, in case someone else is facing the same issue, I'll post how I solved it. First, let me add that I had the same issue using json library instead of pickle: once the file (json or pkl) was written using py3, then I was able to read it with both py3 and py2, but py3 read it as *str* while p

[web2py] Re: I want to delete the file created as a result of an upload field.

2019-10-11 Thread 'jim kaubisch' via web2py-users
Thanks Dave, below is a version of the code as is, inches a variant of what you suggested I think... # --- @auth.requires(auth.has_membership(role='super')) def del_op_audios(): try: # Before we delete the db

[web2py] Re: How to use T in layout.html in Py4web?

2019-10-11 Thread Ruslan Gareev
Thanks. But how about auth controller? When i open auth page with T in layout.html it falls with error, that T is undefined. пятница, 11 октября 2019 г., 11:19:17 UTC+5 пользователь Massimo Di Pierro написал: > > No. You should not define T in your view and your should not define T in > your ac

[web2py] Re: How to easily implement another CSS-Framework

2019-10-11 Thread Ruslan Gareev
Hi. Yes, you can delete files. For me it's normal and i use that way in my projects. пятница, 11 октября 2019 г., 10:38:52 UTC+5 пользователь Jay B написал: > > Hello guys, > > I'm trying to figure out how to include another CSS framework instead of > bootstrap. But the fact that the layout.html

[web2py] Re: Bugfixes for older versions of Web2Py?

2019-10-11 Thread Dave S
And upgrading is simple, just unzipping or git-ing the new version. If you're nervous, set up a new directory, and copy your files to it, then switch your config to point to the new dir. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

[web2py] Calculating the number of days from given dates givesa null value!

2019-10-11 Thread Dave S
Since you are working with date fields, just do the time timedelta directly. I don't know where the None comes from, but why bother with strptime? /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goo

[web2py] Re: How to use T in layout.html in Py4web?

2019-10-11 Thread Massimo Di Pierro
Good point. Need to change the auth object so you can pass it. Let me think about it. On Friday, 11 October 2019 09:46:49 UTC-7, Ruslan Gareev wrote: > > Thanks. But how about auth controller? > When i open an auth page, with T in layout.html, it falls with error: "T > is undefined". > > пятница