[web2py] Re: json to request.vars

2018-02-04 Thread Anthony
In jQuery, if you do: data: {json1: JSON.stringify([1, 2, 3])}, contentType: 'application/json' Then in the controller, request.post_vars.json1 will be the Python list, [1, 2, 3] -- no need to do any JSON conversion on the server side. Note, the JSON must be an object with keys, not

[web2py] About Rest API uploads (again)

2018-02-04 Thread marco mansilla
Hi everyone, this is something that has been asked several times and still there's no specific solution. I need to upload files by using a Rest API, so far I know we have nice ways to implement our apps in web2py http://www.web2pyslices.com/slice/show/1533/restful-api-with-web2py is one way,

[web2py] Re: json to request.vars

2018-02-04 Thread lucas
hey all and anthony, i've tried a bunch of things, including your suggestion above. here are my results and this is using web2py 2.16.1. on the client side, under the view's header, i have: a = getArray(); //displays the grabbed array

[web2py] Re: web2py gunicorn dockerfile

2018-02-04 Thread 黄祥
done 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) --- You received this message because you are subscribed to the Google Groups

[web2py] Re: how to hash the a users password in bash script

2018-02-04 Thread 黄祥
pls try: *e.g.* *test/controllers/install.py (for running with curl)* def index(): if db(db.auth_permission).isempty() and db(db.auth_membership).isempty(): auth_user_id_1 = db.auth_user.insert(first_name = 'Admin', last_name = 'Admin', email = 'ad...@test.com', username = 'admin', password =

[web2py] Downloading ALL images in a table at once

2018-02-04 Thread mostwanted
I have a table which stores different images of different places, what i want is for the site users to be able to download all the images of a selected place by clicking the download button without having to download the images one at a time. How can i achieve this?? I tried this below:

[web2py] Update Web2Py from admin page > Error - from version 2.14.6

2018-02-04 Thread Mamisoa Andriantafika
Hi, I tried to upgrade the easy way from the admin screen but now I get a ticket that I cannot read. At one point I get: Requires web2py 2.15.5 or newer I installed previously for the one step install (Linux). I tried again but I get a 404 error from: wget

[web2py] Re: how to hash the a users password in bash script

2018-02-04 Thread Anthony
A few options: - Convert the bash script to a Python script. - From the bash script, call a Python script just to do the inserts (using PyDAL in the Python script). - From the bash script, call a Python script just to calculate the hashed password (using the web2py CRYPT

Re: [web2py] Re: Switching database backend from sqlite to mysql

2018-02-04 Thread JONATHAN BURKERT
Adding the line `db._adapter.reconnect()` to the top of the function seems to have solved the problem. Thanks so much for the help. On Sun, Feb 4, 2018 at 4:02 AM, LoveWeb2py wrote: > Hi Massimo, > > Thank you for responding. Do you have an example? I am having the same >

[web2py] Re: Switching database backend from sqlite to mysql

2018-02-04 Thread LoveWeb2py
Hi Massimo, Thank you for responding. Do you have an example? I am having the same struggle. Thank you again. On Sunday, February 4, 2018 at 12:46:08 AM UTC-5, Massimo Di Pierro wrote: > > I believe the problem is that pydal is designed to not allow db to be > shared among multiple threads to