[web2py] How to create js function before web2py.js send data to server?

2019-04-21 Thread Константин Комков
I need to validate data on page before send it to server, How to create js function before web2py.js send data to server? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Rep

[web2py] Re: Unable to edit grid record if I add @auth.requires_signature() to action. Is this normal?

2019-04-21 Thread João Matos
You didn't understand. In both cases I'm logged in. If I have @requires_login() it all works. If I replace it with @requires_signature() the grid opens OK, but I'm unable to edit a record. The menu option I created to open the grid has the user_signature=True and the grid has the default of user

Re: [web2py] Re: Web3py

2019-04-21 Thread Kevin Keller
Authentication + authorization and documentation of endpoints are actually the hardest part. There is a. Flask based framework called connexxion which asks you to create the openapi spec before the code which has jwt and oauth2 build in as. Well. Then there are flask Rebar which can use jwt and

[web2py] Where do I find the user/profiel and user/change_password forms?

2019-04-21 Thread João Matos
I'd like to make changes to the user/profile and user/change_password forms, but I can't find them. -- 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 r

[web2py] Re: SQLFORM.smartgrid selectable return string or list

2019-04-21 Thread icodk
You both are righ: What's work now (also should worke before): selectable=[('change price 100', lambda ids: modify_price(ids,100) ), ] and the function in the same controller: def modify_price(ids,inc): print request.vars.records print ids print inc Both request.vars.records and ids are lists

[web2py] Re: Where do I find the user/profiel and user/change_password forms?

2019-04-21 Thread Anthony
On Sunday, April 21, 2019 at 7:32:50 AM UTC-4, João Matos wrote: > > I'd like to make changes to the user/profile and user/change_password > forms, but I can't find them. > In the associated methods in tools.py: https://github.com/web2py/web2py/blob/master/gluon/tools.py#L3646 -- Resources: -

[web2py] Re: Unable to edit grid record if I add @auth.requires_signature() to action. Is this normal?

2019-04-21 Thread Anthony
Can you show your code? I cannot reproduce this exact behavior. Note, because the default behavior of @auth.requires_signature() is to include the query string when creating the signature, any functionality of the grid that uses the query string should not work, as the grid does not generate si

[web2py] Re: Unable to edit grid record if I add @auth.requires_signature() to action. Is this normal?

2019-04-21 Thread João Matos
I wanted to have signed URL everywhere. For that, I added user_signature=True to all my URL(). The grid has that as a default. At this point everything worked with @requires_login() except one special case (I believe this special case may be related to the same issue I'm facing with this I desc

[web2py] Re: Where do I find the user/profiel and user/change_password forms?

2019-04-21 Thread João Matos
Thanks Anthony. domingo, 21 de Abril de 2019 às 13:54:32 UTC+1, Anthony escreveu: > > On Sunday, April 21, 2019 at 7:32:50 AM UTC-4, João Matos wrote: >> >> I'd like to make changes to the user/profile and user/change_password >> forms, but I can't find them. >> > > In the associated methods in t

[web2py] Re: Python3 GAE 502 Error

2019-04-21 Thread Jacinto Parga
The first issue (fatal:ambiguous argument'HEAD') solved just with git init. The second one 'Bad Gateway' in google app engine with python3.7 not yet. May be this solution valid for web2py) https://stackoverflow.com/questions/54565417/error-bad-gateway-502-when-opening-google-app-engine-python

[web2py] Re: Unable to edit grid record if I add @auth.requires_signature() to action. Is this normal?

2019-04-21 Thread Anthony
On Sunday, April 21, 2019 at 10:53:08 AM UTC-4, João Matos wrote: > > I wanted to have signed URL everywhere. > For that, I added user_signature=True to all my URL(). The grid has that > as a default. > At this point everything worked with @requires_login() except one special > case (I believe th

[web2py] Re: Unable to edit grid record if I add @auth.requires_signature() to action. Is this normal?

2019-04-21 Thread João Matos
Here it is: @auth.requires_login() # @auth.requires_signature() def index(): # type: () -> Dict[str, gluon.DIV] """Index page. :return: Dict with grid. """ if not request.vars.sid: redirect(URL('default', 'index')) if session.sids[request.vars.sid].return_to:

[web2py] Re: Unable to edit grid record if I add @auth.requires_signature() to action. Is this normal?

2019-04-21 Thread João Matos
Here is the correct version (my previous post, which I deleted, was another version): #@auth.requires_signature() @auth.requires_login() def index(): # type: () -> Dict[str, gluon.DIV] """Index page. :return: Dict with grid. """ if session.return_to: del session.retur

[web2py] Re: Python3 GAE 502 Error

2019-04-21 Thread Jacinto Parga
Or may be what i need is just to know what is the entrypoint in the app.yalm for my web2py application runtime: python37 entrypoint: gunicorn -b :$PORT main:app El domingo, 21 de abril de 2019, 18:19:59 (UTC+2), Jacinto Parga escribió: > > The first issue (fatal:ambiguous argument'HEAD') sol

Re: [web2py] Re: Web3py

2019-04-21 Thread Kevin Keller
I was wrong.. Found a recent integration with bottle and oauthlib.. https://github.com/thomsonreuters/bottle-oauthlib/blob/master/README.md Now we only need to figure out jwt and easy rest crud.. Which bottle is perfect for and finally use the before mentioned openapi generator with bottle and we

Re: [web2py] Re: Web3py

2019-04-21 Thread 黄祥
Traceback (most recent call last): File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 460, in import_apps module = importlib.import_module(app_name) File "/Users/sugizo/miniconda3/envs/python3_test/lib/python3.7/importlib/__init__.py" , line 127, in import_module return _bo

Re: [web2py] Re: Web3py

2019-04-21 Thread Massimo Di Pierro
I will work on auth. I could use some help with _dashboard. The "create app", "upload app" and "pack app" buttons do not work but this logic should work the same as in web2py. Should be easy to backport if somebody can help this week. Massimo On Sunday, 21 April 2019 09:32:27 UTC-7, Kevin Kel