[web2py] Using Http.Client module in my controls

2019-02-26 Thread elisha bere
Hello, I am trying to implement Http.client so i can send bulk sms using my web2py app. If i just import Http.Client i get an error. Please assist i have been trying for weeks now but still no luck. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/we

[web2py] Bad MySQL migration when there shouldn't be one?

2019-02-26 Thread Scott Hunter
I'm seeing the following error in a web2py 2.14.6 app @ pythonanywhere OperationalError: (1553, "Cannot drop index 'f_User__idx': needed in a foreign key constraint") This is an app that is using MySQL. I have not changed any models, and all migrations are disabled, either of which not being t

[web2py] Re: 2.18.2 translate function has gone from gluon.validators

2019-02-26 Thread Donald McClymont
Many thanks - I will resume testing once merged Donald -- 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 subscri

[web2py] Re: 2.18.2 translate function has gone from gluon.validators

2019-02-26 Thread Leonel Câmara
This was a backwards incompatible change, I made a pull request changing it so you can keep using translate: https://github.com/web2py/web2py/pull/2104 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] 2.18.2 translate function has gone from gluon.validators

2019-02-26 Thread Donald McClymont
I use Leonel Camara's excellent plugin location picker however it includes the following line from gluon.validators import Validator, translate it seems translate has become translator - but I haven't looked at in detail or fully followed - but need some guidance on how this is supposed to ope

[web2py] Re: hidden field on CRUD

2019-02-26 Thread Dave S
On Tuesday, February 26, 2019 at 4:48:01 AM UTC-8, Diego Tostes wrote: > > Done. > > I did using the table definitions ... > > Field('user_id', 'integer',writable=False > ,readable=False,default=user_dic["user_id"]) > Be aware that CRUD is deprecated, and support limited pretty much to securi

[web2py] another python 3 minor bug in 2.18.2: b'Logged in'

2019-02-26 Thread Yi Liu
b'Logged In' in flash message: [image: Screen Shot 2019-02-26 at 12.33.29.png] This is in auth, not something in my app, right? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Javascript return value

2019-02-26 Thread Ben Duncan
Given I have the following sweet alert js: -- (async function getCompany () { const inputOptions = new Promise((resolve) => { setTimeout(() => { resolve(myargs) }, 2000) }) const {value: co

[web2py] Good service practice

2019-02-26 Thread xgp . latino
Hello, Im a newbie coder. Im implementing an android app which make json post to web2py and transfer data in and out. Actually my process is working, but I want to know if what i coded is right and offers the best performance. def anyfunction(): if request.vars.var1 == "something1":

[web2py] Re: 2.18.1 is OUT

2019-02-26 Thread Yi Liu
fixed in 2.18.2 On Monday, February 25, 2019 at 4:38:21 PM UTC-8, Yi Liu wrote: > > A python 3 bug: > > 'dict' object has no attribute 'iteritems' > Version > web2py™ Version 2.18.1-stable+timestamp.2019.02.24.06.24.15 > Python Python 3.7.2: > /Users/LaVie/.pyenv/versions/miniconda3-4.3.11/bin

[web2py] Problem updating list stored in session

2019-02-26 Thread Jon Subscripted
Hi everyone, I'm having some trouble updating session data. I have a controller/view that allows to perform a query that returns a bunch of db ids. As I will be using these ids and I used a complex query to retrieve them I store them in the session, with the statement below. Thus another controll

[web2py] Web2py version 2.18.2 Communications Error when in Admin.

2019-02-26 Thread John McMaster
Just installed web2py version 2.18.2 and now I get a communications error when I save changes in an app. I get nothing in the error logs. The apps run but when I go to edit them and click the save button at the top of the lefthand page I get a red communications error in the field to the rig

Re: [web2py] Re: standalone templates

2019-02-26 Thread Carlos Cesar Caballero Díaz
We still are not working in models, we want to treat some rough edges first with controllers overriding and views. But it should be included as an app component (just like cache and session). Greetings. El 26/2/19 a las 12:41 a.m., Massimo Di Pierro escribió: nice work. Have you used it with

[web2py] Re: Get files from string

2019-02-26 Thread Leonel Câmara
You should append the files directly to formdata instead of pushing them into the endUserFiles and appending an array. It's ok to put multiple values in the same key in formdata using append for (var i = 0;ihttp://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Re: Get files from string

2019-02-26 Thread Константин Комков
Leonel Câmara, yes I have. Difference in topic before I sent only files in FormData, now I send variables email, phone and variable files which contain js array - endUserFiles. > > Ajax function: > jQuery.ajax({ > type: "POST", > url: "loadDocs", > data: data, > cache: false, > processData: false

[web2py] Re: Get files from string

2019-02-26 Thread Leonel Câmara
How are you making the ajax call? Do you have processData: false and contentType: false in your options? -- 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) ---

Re: [web2py] Re: Custom Delimiters Broken in 2.18.1?

2019-02-26 Thread Tiago Alves
I am using custom delimiters, all working fine... > On 26 Feb 2019, at 13:24, Kevin Keller wrote: > > Saw a 2.18.2 commit. > Was that addressed in thst commit? > > Thanks! > > > >> On Mon, 25 Feb 2019, 06:08 Massimo Di Pierro, >> wrote: >> Damn you are right. I am releasing 2.18.2 with a f

Re: [web2py] Re: Custom Delimiters Broken in 2.18.1?

2019-02-26 Thread Kevin Keller
Saw a 2.18.2 commit. Was that addressed in thst commit? Thanks! On Mon, 25 Feb 2019, 06:08 Massimo Di Pierro, wrote: > Damn you are right. I am releasing 2.18.2 with a fix. > > On Sunday, 24 February 2019 18:31:27 UTC-8, Limedrop wrote: >> >> >> Hi there, >> >> I think the custom template del

[web2py] Re: hidden field on CRUD

2019-02-26 Thread Diego Tostes
Done. I did using the table definitions ... Field('user_id', 'integer',writable=False ,readable=False,default=user_dic["user_id"]) Em ter, 26 de fev de 2019 09:34, Diego Tostes escreveu: > Hi, > > i have this controller: > > def cria_servico(): > crud.settings.create_next = URL('default'

[web2py] hidden field on CRUD

2019-02-26 Thread Diego Tostes
Hi, i have this controller: def cria_servico(): crud.settings.create_next = URL('default', 'dashboard') form = crud.create(db.service) I have a field on db.service named user_id. I whant to force the form to fill this field with the auth_user.id of the user. How can i hidden this field?

[web2py] Re: auth.settings user_url

2019-02-26 Thread Leonel Câmara
It's auth.settings.login_url which you should change. Probably you also want to change: auth.settings.verify_email_next auth.settings.request_reset_password_next -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

[web2py] auth.settings user_url

2019-02-26 Thread 'Annet' via web2py-users
I have one application that takes car of all the auth stuff. In the init application I have a couple of functions that require login,. I added this line of code session.connect(request, response, masterapp="controlpanel") and decorated the functions with @auth.requires_login() and set auth.sett

[web2py] Get files from string

2019-02-26 Thread Константин Комков
I send ajax request using FormData with variable which contains js array with files. In python function I can get this variable, but it contain string like that: > > request.vars.files = '[object File],[object File],[object File]' How can I get files from that string? -- Resources: - http://we