[web2py] Re: web2py 2.18.5: LOAD bugs?

2020-02-18 Thread Toan Le
My OS is windows 10. print vars and URL(vars=vars): /welcome/default/grid On Saturday, February 15, 2020 at 6:18:55 PM UTC+7, Massimo Di Pierro wrote: > > works for me. can you try print vars and URL(vars=vars)? > > On Monday, 10 February 2020 18:41:54 UTC-8, Toan Le wrote: >> >> Controller:

[web2py] Re: py4web and record versioning

2020-02-18 Thread Carlos Hanson
Greetings, I just started using py4web, and I'm very excited to do so. Has there been any more thought on this issue? I was partially into a new web2py app in which I use _enable_record_versioning(), and I am migrating it to py4web. Thanks. On Saturday, August 17, 2019 at 10:34:21 PM

[web2py] Re: Web2py sessions in scheduler

2020-02-18 Thread Dave S
On Monday, February 17, 2020 at 3:33:39 AM UTC-8, Frédéric Samson wrote: > > Every scheduler task that is running stores a session in my database. Is > there a way to not to store the session when request.is_scheduler is true? > Google doesn't make it clear, but checking "show at the top"

[web2py] Re: Expose db.auth_user table via rest api

2020-02-18 Thread Kevin Keller
Found the answer here: https://stackoverflow.com/questions/37806801/can-not-post-data-via-ajax-to-web2py-rest-api-possible-cors-issue def api(): *from gluon.serializers import json* response.view = 'generic.'+request.extension def GET(*args,**vars): patterns = 'auto' parser =

[web2py] Re: Expose db.auth_user table via rest api

2020-02-18 Thread Kevin Keller
I didnt know I need to post the data as form data. Now it works. How I can post a JSON payload instead and use that payload for insert_and_validate? I tried this: def POST(table_name,**vars): import json data=json.loads(request.body.read()) data=json.dumps(data)

[web2py] Re: Expose db.auth_user table via rest api

2020-02-18 Thread Kevin Keller
Even when I manually try to convert the post data I get the error: def POST(table_name,**vars): restdata=request.vars return dict(db[table_name].validate_and_insert(restdata.decode("utf-8"))) On Tuesday, 18 February 2020 10:01:14 UTC-8, Kevin Keller wrote: > >

[web2py] Re: Expose db.auth_user table via rest api

2020-02-18 Thread Kevin Keller
I tried a custom pattern with the get method, but still dont get the users from auth_user @request.restful() def api(): def GET(*args, **vars): patterns = [ "/users[auth_user]" ] parser=db.parse_as_rest(patterns,args,vars) return

[web2py] buefy for bulma /py4web

2020-02-18 Thread António Ramos
py4web has bulma out of the box so i guess buefy is more advisable than vuetify to use with py4web right ? https://buefy.org/ -- 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] Expose db.auth_user table via rest api

2020-02-18 Thread Kevin Keller
When creating a simple rest api with web2py: @request.restful() def api(): def GET(*args, **vars): parser=db.parse_as_rest('auto',args,vars) return dict(content=parser.response) def POST(table_name,**vars): return

[web2py] Re: Many records in one transaction

2020-02-18 Thread Константин Комков
I can't solve that problem still. I have additional information also. Maximum count of unique rows for insert can be 25000, and before I need to delete maximum 25000 rows in database. Seems like it's IIS settings, becouse if I work with 5000 unique rows and Rocket server on local I don't have

Re: [web2py] py4web psycopg2 error

2020-02-18 Thread Maurice Waka
Thanks. It's working now. Regards On Tue, Feb 18, 2020, 18:31 E L wrote: > you need to install psycopg2 package > pip3 install psycopg2 > or > pip3 install psycopg2-binary > > On Tue, Feb 18, 2020 at 7:52 AM Maurice Waka > wrote: > > > > SO I start importing/changing from web2py to py4web. > >

[web2py] Re: ERROR on Request

2020-02-18 Thread Maurice Waka
BUT Now I get this: Field('modified_on', 'datetime', default=request.now, update=request.now), File "/usr/local/lib/python3.6/dist-packages/bottle.py", line 1400, in __getattr__ raise AttributeError('Attribute %r not defined.' % name) AttributeError: Attribute 'now' not defined. On

[web2py] Re: ERROR on Request

2020-02-18 Thread Maurice Waka
Thanks @Lovdie got from py4web import request, On Tuesday, February 18, 2020 at 6:58:10 PM UTC+3, Maurice Waka wrote: > > In py4web, I cant use this syntax: > default = request.now > > > Error: > > Field('modified_on', 'datetime', default=request.now),# > update=request.now), >

[web2py] ERROR on Request

2020-02-18 Thread Maurice Waka
In py4web, I cant use this syntax: default = request.now Error: Field('modified_on', 'datetime', default=request.now),# update=request.now), NameError: name 'request' is not defined -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: PY4WEB socketIO

2020-02-18 Thread Vicente Orru
Massimo, maybe zeroMQ can be good for you. Em ter., 18 de fev. de 2020 às 06:44, António Ramos escreveu: > I was not expecting less than that from Massimo :) > > Em ter., 18 de fev. de 2020 às 03:45, Massimo Di Pierro < > massimo.dipie...@gmail.com> escreveu: > >> It would be trivial to

[web2py] Future of web2py

2020-02-18 Thread Clemens
Hello Massimo, I've understood, that py4web is the future. But I have one important question: Will web2py further maintained? And how long will it be maintained? I'm asking, because I've developed an application on web2py and I need to plan when it has to be migrated/re-implemented. And what

Re: [web2py] py4web psycopg2 error

2020-02-18 Thread E L
you need to install psycopg2 package pip3 install psycopg2 or pip3 install psycopg2-binary On Tue, Feb 18, 2020 at 7:52 AM Maurice Waka wrote: > > SO I start importing/changing from web2py to py4web. > File > "/home/maurice/.local/lib/python3.6/site-packages/pydal/adapters/base.py", > line

[web2py] py4web google oauth issue

2020-02-18 Thread Eric
When trying to use oauth2 with google I received this error > Legacy People API has not been used in project X before or it is > disabled. Enable it by visiting > https://console.developers.google.com/apis/api/legacypeople.googleapis.com/overview?project=X > > then retry. If

[web2py] py4web psycopg2 error

2020-02-18 Thread Maurice Waka
SO I start importing/changing from web2py to py4web. On trying to install the index page and try it, I get this error: Traceback (most recent call last): File "/home/maurice/.local/lib/python3.6/site-packages/pydal/base.py", line 506, in __init__ self._adapter = adapter(**kwargs) File

Re: [web2py] Re: validator formatter when validation fails

2020-02-18 Thread E L
thanks, it works for me On Mon, Feb 17, 2020 at 9:16 PM Massimo Di Pierro wrote: > > I think this is fixed now. Please give it a try. > > On Monday, 17 February 2020 13:53:34 UTC-8, Eric wrote: >> >> In py4web, when form validation fails on a datetime field, py4web throws and >> exception. >>

[web2py] Re: MySQL server has gone away - py4web

2020-02-18 Thread Marcello
Hi Massimo, Great ! Now worked fine... Thanks On Tuesday, February 18, 2020 at 12:22:04 AM UTC-3, Massimo Di Pierro wrote: > > sorry. My bad. try: > > +self._adapter.reconnect() > > On Sunday, 16 February 2020 19:17:25 UTC-8, Marcello wrote: >> >> I got this error: >> >> File

[web2py] Re: py4web translations

2020-02-18 Thread clara
Thanks Massimo, it works! El martes, 18 de febrero de 2020, 0:47:41 (UTC-3), Massimo Di Pierro escribió: > > You have to pass T to the view > > @action('index') > @action.uses('index.html', T) > def index(): > return dict(message="hello world", T=T) > # in view [[=T(message)]] > > or

Re: [web2py] Re: PY4WEB socketIO

2020-02-18 Thread António Ramos
I was not expecting less than that from Massimo :) Em ter., 18 de fev. de 2020 às 03:45, Massimo Di Pierro < massimo.dipie...@gmail.com> escreveu: > It would be trivial to implement it like flask does. > > You can do it right now using the bottlepy way: >