[web2py] Re: Validation messages of extra fields in auth_user don't comply with available translations

2019-04-06 Thread João Matos
All my grids and forms get auto-translated validation messages correctly. Here is an example table = db.sn_counter # type: Table grid = SQLFORM.grid( table, csv=False, details=False, ondelete=on_delete, # Grid only. on

[web2py] Re: Custom validator broken in 2.18.4, working in 2.17.2

2019-04-06 Thread David Manns
The web2py book needs to be updated, as Anthony points out. As suggested I changed the validator to: class IS_MEMBERSHIP_YEAR_END(Validator): def __init__(self, error_message='Not a membership year end'): self.error_message = error_message def validate(self, value): yearen

[web2py] Re: Validation messages of extra fields in auth_user don't comply with available translations

2019-04-06 Thread Anthony
Can you post a minimal app the reproduces the problem? On Saturday, April 6, 2019 at 4:24:12 AM UTC-4, João Matos wrote: > > All my grids and forms get auto-translated validation messages correctly. > Here is an example > > table = db.sn_counter # type: Table > > grid = SQLFORM.g

[web2py] Re: Validation messages of extra fields in auth_user don't comply with available translations

2019-04-06 Thread João Matos
I created a minimal app and it showed the problem. I di some further testing and confirmed that there is a relation with the positioning of the T.force(). If the T.force() is after the extra_fields creation (which reside in db.py), the fields validation messages are always in English, even after

[web2py] Re: Validation messages of extra fields in auth_user don't comply with available translations

2019-04-06 Thread Anthony
Yes, post the app. On Saturday, April 6, 2019 at 12:49:15 PM UTC-4, João Matos wrote: > > I created a minimal app and it showed the problem. > I di some further testing and confirmed that there is a relation with the > positioning of the T.force(). > If the T.force() is after the extra_fields cre

Re: [web2py] Re: Using the results of a variable returned by one function in another function

2019-04-06 Thread mostwanted
Using a session on the application in computer the one i haven't uploaded online works very well, it gives me the results i want but when i make similar updates to my online application i get an error message: * 'NoneType' object has no attribute 'id'* I dont know what the problem is! Am i missi

[web2py] Re: CSS button alignment

2019-04-06 Thread 'Annet' via web2py-users
I think Bootstrap's float-right and float-left will solve this issue. https://getbootstrap.com/docs/4.1/utilities/float/ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repo

[web2py] Re: Validation messages of extra fields in auth_user don't comply with available translations

2019-04-06 Thread João Matos
The app will start in Portuguese. You can change that by uncommenting the T.force() in db1.py, but it would be good to do the testing with Portuguese first to see the problem. After registering, create a new record and in the field ùltimo atribuído (last_assigned) input -1 which will return a va

[web2py] Re: Custom validator broken in 2.18.4, working in 2.17.2

2019-04-06 Thread Leonel Câmara
Did you import ValidationError as well? -- 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

[web2py] Re: Custom validator broken in 2.18.4, working in 2.17.2

2019-04-06 Thread David Manns
Changed my import to: from pydal.validators import Validator, ValidationError class IS_MEMBERSHIP_YEAR_END(Validator): def __init__(self, error_message='Not a membership year end'): self.error_message = error_message def validate(self, value): yearend = datetime.date(2018

[web2py] Re: Custom validator broken in 2.18.4, working in 2.17.2

2019-04-06 Thread David Manns
PS this is not backward compatible to 2.17.2 On Thursday, April 4, 2019 at 4:52:37 PM UTC-4, David Manns wrote: > > The table in question has a field: > > Field('Paiddate', 'date', requires = [IS_EMPTY_OR(IS_DATE()), > IS_EMPTY_OR(IS_MEMBERSHIP_YEAR_END())]), > > The custom validator is: > >

[web2py] pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
I have community version of pycharm and windows 10 binary version of web2py. Pycharm: "No python interpreter selected" How to resolve this? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] Re: Validation messages of extra fields in auth_user don't comply with available translations

2019-04-06 Thread Anthony
The problem is unique to the IS_*_IN_RANGE validators, all of which create a translated error message at the time they are instantiated rather than at validation time. For example, here is the init code for IS_INT_IN_RANGE: https://github.com/web2py/pydal/blob/e973f27b69a8499e4e30e5663f3fba74bf

[web2py] Re: Custom validator broken in 2.18.4, working in 2.17.2

2019-04-06 Thread Anthony
The book should be update, but we should also decide if we're OK breaking backward compatibility in this way. Anthony On Saturday, April 6, 2019 at 3:06:20 PM UTC-4, David Manns wrote: > > Changed my import to: > > from pydal.validators import Validator, ValidationError > > class IS_MEMBERSHIP_Y

[web2py] Re: Validation messages of extra fields in auth_user don't comply with available translations

2019-04-06 Thread João Matos
Thanks Anthony. I will open an issue (I still haven't enough know how to make a PR). I hope some time in the future. I don't want to abuse your help, but I have another issue that is viewable with the minimal app I sent you. If you create 2 records with different dates, and try to change the gri

[web2py] Re: Thank you Web2py community - I have completed a live application, ViewBase.com, using Web2py

2019-04-06 Thread William
Thank you! I have learnt lots from this project. -- 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

[web2py] Recursive table relation

2019-04-06 Thread Carlos Cesar Caballero Díaz
Hi, I have this table definition: db.define_table('organization',     Field('name', 'string', require=[IS_ALPHANUMERIC(), IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'organization.name')], label=T('Name')),     Field('description', 'text', label=T('Description')),     Field('parent', 'reference organizati

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
same question with Wing IDE, what do I enter for python path? -- 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 su

[web2py] Recursive table relation

2019-04-06 Thread Leonel Câmara
Possibly because you have require instead of requires? -- 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 subscribe

Re: [web2py] Recursive table relation

2019-04-06 Thread Carlos Cesar Caballero Díaz
That's a typo :) El 6/4/19 a las 8:24 p.m., Leonel Câmara escribió: Possibly because you have require instead of requires? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread 黄祥
WindowsWindows 10 and Windows 8 1. In Search, search for and then select: System (Control Panel) 2. Click the *Advanced system settings* link. 3. Click *Environment Variables*. In the section *System Variables*, find the PATH environment variable and select it. Click *Edit*. If the

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
I see this attached. What value am I supposed to specify? -- 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 subsc

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread 黄祥
pls check it out https://geek-university.com/python/add-python-to-the-windows-path/ best regards, stifan -- 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) ---

[web2py] Re: pycharm "No python interpreter selected"

2019-04-06 Thread Alex Glaros
my understanding is that it is looking for a file name python.exe but the binary version of windows web2py does not have that file. Do I just point to the gluon directory? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Modules not loading in python 3

2019-04-06 Thread John Bannister
Hi all, I have recently upgraded to python 3.6 from 2.7 running on Centos7 with apache. Problem I am having is as follows:- 1: I have a number of apps each of which has a number of modules. Whilst it seems that I can import modules from paython (such as pytz etc) and I can also import modules

[web2py] concurrent queries to restful service response time issue

2019-04-06 Thread Metra Oknehcvark
Hello , All! Hope someone can point me to right direction. I have restfull service , with a simple def like : ... u = storage.executesql('UPDATE mitms SET ls = "' + str(f) + '" WHERE ls = "N" LIMIT 1;') ... s = storage(mw.ls == f).select(mw.iIdL).first() ... return response.json({})

Re: [web2py] Re: Why python anywhere stuck with web2py 2.15 version

2019-04-06 Thread Massimo Di Pierro
I think web2py is predicated on backward compatibility. If they switch legacy apps will no longer work and that is bad. Instead we should push web2py for py2 and web3py for python 3. That will eliminate confusion and will allow to fix our mistakes and move into the future. Massimo On Monday, 1

Re: [web2py] Re: web3py again....

2019-04-06 Thread Massimo Di Pierro
I like bottle because it is simpler than flask. Can you make a good case for why Flask over bottle? On Tuesday, 2 April 2019 00:56:31 UTC-7, Kevin Keller wrote: > > Here is a project that generates swagger(openapi) documentation for > flask+sqlalchemy. https://github.com/thomaxxl/safrs > I was

[web2py] Re: Custom validator broken in 2.18.4, working in 2.17.2

2019-04-06 Thread Massimo Di Pierro
we will fix the backward incompatibility asap. Not intentional. On Saturday, 6 April 2019 12:12:47 UTC-7, David Manns wrote: > > PS this is not backward compatible to 2.17.2 > > On Thursday, April 4, 2019 at 4:52:37 PM UTC-4, David Manns wrote: >> >> The table in question has a field: >> >> Fi

[web2py] Re: Thank you Web2py community - I have completed a live application, ViewBase.com, using Web2py

2019-04-06 Thread Massimo Di Pierro
Congratulations William On Friday, 5 April 2019 09:44:56 UTC-7, William wrote: > > Just writing to thank Massimo and the Web2py community, for answering all > my questions here and also building this awesome framework. > > I'm proud to say my application, https://www.viewbase.com, is live! I was

[web2py] Re: Thank you Web2py community - I have completed a live application, ViewBase.com, using Web2py

2019-04-06 Thread mostwanted
Congratulations William, this is great stuff. Mostwanted On Friday, April 5, 2019 at 6:44:56 PM UTC+2, William wrote: > > Just writing to thank Massimo and the Web2py community, for answering all > my questions here and also building this awesome framework. > > I'm proud to say my application,