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:
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 UTC-7,
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" shoul
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 = db.p
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)
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:
>
> When
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 dict(cont
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
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 dict(db[table_name].validate_and_insert(**
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 e
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.
> >
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 Tuesd
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),
> NameEr
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)
- http://github.com/web2py/web2py
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 implemen
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 do
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 13
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 yo
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
"/
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.
>> In
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 "/home/par
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
>
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:
> https://pypi.org/project/bottle-websocket
23 matches
Mail list logo