[web2py] web2py fails auth on mysql with 1045 error

2022-05-01 Thread Ivan Gazzola
I'm trying to connect to a new db: db=DAL('mysql://userx:password@localhost/IgXortho?set_encoding=utf8mb4') I can login with my user, when I check grants I've got this: >< mysql> show grants; +---

[web2py] Web2py fail auth to mysql

2022-05-01 Thread Ivan Gazzola
I'm ring to connect to a new db: db=DAL('mysql://userx:password@localhost/IgXortho?set_encoding=utf8mb4') I can login with corteo user, when I check grants I've got this: >< mysql> show grants; +-

[web2py] Looking for web2py developer for Italian small company

2020-01-21 Thread Ivan Gazzola
We are a small company in Italy, we need a new developer for our project (xortho.it) The web app is developed with jquery mobile and web2py, we are planning to move to angular and web2py or better py4web. If you're interested please contact us. Ciao Ivan -- Resources: - http://web2py.com -

[web2py] Re: Admin password

2019-10-25 Thread Ivan Gazzola
I've got the same problem How did you solve it? Thx Ivan Gazzola Il giorno giovedì 16 maggio 2019 17:32:26 UTC+2, Gaël Princivalle ha scritto: > > >Does parameters_443.py exist in web2py dir? > Yes. > > >Check permissions - does web2py have access to this file? >

[web2py] How to debug views?

2018-11-18 Thread Ivan Gazzola
I'm writing my code with Pycharm and I like testing my code and debug with breakpoints. Is there a way to debug python code in views? I can't figure out how to do that, I just check errors in admin interface :( Thx Ivan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: ondelete attribute missing in 2.17.2

2018-11-04 Thread Ivan Gazzola
_IN_DB(db, > 'Preventivi.id')),ondelete='SET NULL') > > > > On Sunday, 4 November 2018 12:50:21 UTC-8, Ivan Gazzola wrote: >> >> I've updated to 2.17.2-stable from 2.16.1 but i've got this error: >> >> invalid table "Prest

[web2py] ondelete attribute missing in 2.17.2

2018-11-04 Thread Ivan Gazzola
I've updated to 2.17.2-stable but i've got this error: invalid table "Prestazioni" attributes: set(['ondelete']) invalid_kwargs set(['ondelete']) tablename 'Prestazioni' My field is definied as: Field('preventivo',db.Preventivi,requires=IS_EMPTY_OR(IS_IN_DB(db, 'Preventivi.id'))),ondelete='SE

[web2py] Re: MULTIPLE APPLICATIONS IN SAME HOST/SUBDOMAINS WITH NGINX

2017-02-07 Thread Ivan Gazzola
Just edit the routes.py file I'm using sub-domains and a file like this: # -*- coding: utf-8 -*- routers = dict( BASE = dict( default_application="site1", domains= { 'domain.com':'site1', 'app.domain.com

[web2py] request.args and special character

2016-05-24 Thread Ivan Gazzola
I've tried an URI like this "app/controller/function/1%C2%B0%20Classe" for sending the "1° Classe" value If in my function i call request.args(0) I get "1__Classe" If I call request.url.split('/')[-1] I get "1° Classe" Why? I've tried to find the source code for args assignment but I can'

[web2py] Re: Flash message if before_insert fail

2016-02-19 Thread Ivan Gazzola
t; > Got it ... > > > >- If you are going to loop through a set of records, don't recalculate >the same value over and over inside the loop (i.e., in your callback, you >would move the transformation of the Name via CRYPT outside the loop, as >you

[web2py] Re: Flash message if before_insert fail

2016-02-18 Thread Ivan Gazzola
February 18, 2016 at 8:55:49 AM UTC-5, Ivan Gazzola wrote: > > > db.define_table('poc', > Field > <https://xortho.it/examples/global/vars/Field>('Name',required=True), > Field > <https://xortho.it/ex

[web2py] Re: Flash message if before_insert fail

2016-02-18 Thread Ivan Gazzola
db.define_table('poc', Field ('Name',required=True), Field ('Birthday','date',widget=bsdatepicker_widget(),required=True), Field

[web2py] Flash message if before_insert fail

2016-02-18 Thread Ivan Gazzola
How can I change that? I've tried to change response.flash in callback function but this doesn't work properly, I always get the "new record inserted" message even if the record is not stored in DB. Thx Ivan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] Migration from console

2015-12-01 Thread Ivan Gazzola
Is it possible to apply migration from console without changing migrate=False in dal connection? How can I do it? Thx Ivan -- 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] Re: Problem with JSON

2015-02-18 Thread Ivan Gazzola
Ok, solved :) The issue was in some changes in Jquery. Now JQuery parses ajax response before than it is passed to success function, so js fails if I call "parse" on it: risposta=JSON.parse(json); ^^^ THX Ivan Il giorno lunedì 16 febbraio 2015 21:12:17 UTC+1,

[web2py] Problem with JSON

2015-02-16 Thread Ivan Gazzola
After last upgrade i've this problem with response.json -Controller cut --- if form.process().accepted: return response.json({'formkey':form.formkey,'html' :XML(html_from_helpers)}) -cut --- The json generated by controller fails in this js because don't escape double q

[web2py] Re: Problem with sessions2trash.py

2015-02-05 Thread Ivan Gazzola
February 2015 17:17:56 UTC-6, Ivan Gazzola wrote: >> >> #!/bin/bash >> while IFS= read -r app; do >> python /www/web2py/web2py.py --nogui --no-banner -S $app -M -R >> /www/web2pyscripts/sessions2trash.py -A -o -x 28800 -f >> >>/www/web2py/clean.

[web2py] Problem with sessions2trash.py

2015-02-05 Thread Ivan Gazzola
#!/bin/bash while IFS= read -r app; do python /www/web2py/web2py.py --nogui --no-banner -S $app -M -R /www/web2pyscripts/sessions2trash.py -A -o -x 28800 -f >>/www/web2py/clean.txt 2>&1 done http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

[web2py] IPN paypal 404 ???

2014-07-30 Thread Ivan Gazzola
When i call /paypal/ipn from a browser is ok, when paypall try to send IPN the relay is 404??? x.x.x.x - - [30/Jul/2014:13:09:03 +0200] "POST /paypal/ipn HTTP/1.0" 404 66 "-" "PayPal IPN ( https://www.paypal.com/ipn )" x.x.x.x - - [30/Jul/2014:13:10:25 +0200] "POST /paypal/ipn HTTP/1.0" 404 66

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
Ok, i renamed the field logo in logo2 and all works fine... Rechecking the code I saw that I had defined in a previous version the field "logo" as "reference". it is probably not deleted the foreign key in sqlite when I change the definition of the field from "reference" to "upload" thx I

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
I found the code in sqlhtml.py, the empty upload value is '' or default elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname if f == '' or f is None: if self.vars.get(fd, False):

[web2py] Re: Bug in DAL with SQLFORM, upload field and required field ???

2014-01-16 Thread Ivan Gazzola
ntista=1240) it woks. Il giorno giovedì 16 gennaio 2014 00:00:41 UTC+1, Anthony ha scritto: > > What value of dentista is being inserted, and have you confirmed that that > value is the id of one of the records in the Nominativi table? > > On Wednesday, January 15, 2014 5:56:18 PM UT

[web2py] Bug in DAL with SQLFORM, upload field and required field ???

2014-01-15 Thread Ivan Gazzola
I've this table: db.define_table("Consulenze", Field('dentista','reference Nominativi', required=True), Field('data_inizio_collaborazione','date'), Field('data_fine_collaborazione','date'), Field ('percentuale','integer'), Field('logo','upload')) In console insert and upda

[web2py] Re: web2py Italy

2013-12-18 Thread Ivan Gazzola
Arrivo anch'io ... Il giorno mercoledì 18 dicembre 2013 14:41:57 UTC+1, Raffaele Tesi ha scritto: > > Alla grande!!! > > Il giorno venerdì 27 settembre 2013 10:37:23 UTC+2, Gael Princivalle ha > scritto: >> >> Hi. >> >> For web2py users that speak Italian, I've create the web2py-it group. It >>

[web2py] Re: how to refer to other field in filter_in filter_out?

2013-12-17 Thread Ivan Gazzola
file. > > Anthony > > On Tuesday, December 17, 2013 7:35:09 AM UTC-5, Ivan Gazzola wrote: >> >> db.define_table('files', >>Field('nome','reference Nomi',required=True, requires=[IS_IN_DB(db, >> 'Nomi.id')]), >>

[web2py] how to refer to other field in filter_in filter_out?

2013-12-17 Thread Ivan Gazzola
db.define_table('files', Field('nome','reference Nomi',required=True, requires=[IS_IN_DB(db, 'Nomi.id')]), Field('title', "string", unique=False,label="Descrizione"), Field('note'), Field('immagine', 'upload', autodelete=True), Field('datecreated','datetime',default=now,readable=

[web2py] Re: autofocus html5 attribute support?

2013-12-14 Thread Ivan Gazzola
I use in view: form.element('#id_field')['_autofocus']='' and i get: like html5 Il giorno venerdì 9 agosto 2013 04:04:17 UTC+2, Anthony ha scritto: > > form.custom.widget.tm_home["_autofocus"] > > This is just standard Python, so the above simply attempts to retrieve the > value with key

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
://storage.sqlite') in db.py > > > On Sunday, December 8, 2013 3:16:36 PM UTC+1, Ivan Gazzola wrote: >> >> I can't resolve this ticket in my app. I try to insert in >> Pazienti_Consulenza from appadmin but i've always this error: >>

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I changed all fields in 'referece field' format but nothing changes :( For the validatos IS_IN_DB(db,db.table.field,format) is mistaken and return errors, indeed the correct form is IS_IN_DB(db,table.field,format) ... Regards Ivan Il giorno domenica 8 dicembre 2013 17:20:15 UTC+1, 黄祥 ha scritto

[web2py] foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I can't resolve this ticket in mhy app. I try to insert from appadmin but i've always this error: " foreign key constraint failed " This is my model: db.define_table('Nominativi', Field('nome',notnull=True, represent=lambda nome:nome.title()), Field('categoria',db.Categorie_Nominativi,d

[web2py] Re: Encrypt table and search in fields

2013-07-31 Thread Ivan Gazzola
would not require that the application has knowledge of the > encryption/decryption key. > > > > On Wednesday, 31 July 2013 03:27:59 UTC-5, Ivan Gazzola wrote: >> >> I'm trying to use this >> https://groups.google.com/d/msg/web2py/uGFQD0PBefQ/Zi-SPOLVSXIJ for >&

[web2py] Encrypt table and search in fields

2013-07-31 Thread Ivan Gazzola
I'm trying to use this https://groups.google.com/d/msg/web2py/uGFQD0PBefQ/Zi-SPOLVSXIJ for encrypting data in a sqlite table. I need to search in one field with 'like' operator for buil a ajax list, i use this function: def ajaxlivesearch(): partialstr = request.vars.values()[0] query =

[web2py] Re: problem with TAG in module

2013-04-04 Thread Ivan Gazzola
Ok Il giorno giovedì 4 aprile 2013 00:10:02 UTC+2, Massimo Di Pierro ha scritto: > > import gluon > > should be > > from gluon import * > > On Wednesday, 3 April 2013 16:06:24 UTC-5, Ivan Gazzola wrote: >> >> I wrote this module my_util.py: >>

[web2py] problem with TAG in module

2013-04-03 Thread Ivan Gazzola
I wrote this module my_util.py: #!/usr/bin/env python # coding: utf8 import gluon def my_form(form, fields): table = TAG['']() for id, label, controls, help in fields: lab1=str(label) tmp_label=lab1.partition('>') lab1=tmp_label[0]+tmp_label[1]+''+tmp_label[2]

[web2py] Re: Form.process().accepted stops form (web2py + jquery mobile)???

2013-02-23 Thread Ivan Gazzola
> if form.*process*().accepted: > ... > > On Saturday, 23 February 2013 07:27:11 UTC-6, Ivan Gazzola wrote: >> >> I've the action nominativo, that works. >> When i add the if condition for checking form.process().accepted (is the >>

[web2py] Form.process().accepted stops form (web2py + jquery mobile)???

2013-02-23 Thread Ivan Gazzola
I've the action nominativo, that works. When i add the if condition for checking form.process().accepted (is the code from to <) the form submit data but don't accept the variables. Any idea I need the conditional for redirection after form submission def nominativo(): re

[web2py] Re: Autocomplete problem ...

2013-01-29 Thread Ivan Gazzola
qlite if you > change a field type. Delete the database and start again. I do not think > there is anything wrong with your code. > > On Sunday, 27 January 2013 15:51:33 UTC-6, Ivan Gazzola wrote: >> >> Il giorno giovedì 24 gennaio 2013 18:56:59 UTC+1, Massimo Di Pierro ha

[web2py] Re: Autocomplete problem ...

2013-01-27 Thread Ivan Gazzola
Il giorno giovedì 24 gennaio 2013 18:56:59 UTC+1, Massimo Di Pierro ha scritto: > > db.Relation.name.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field= > db.Person.id ) > > db.Relation.contact.widget=SQLFORM.widgetsre.autocomplete(request,db.Person,id_field= > d

[web2py] Autocomplete problem ...

2013-01-24 Thread Ivan Gazzola
I'm trying my first application in web2py. I've this model db.define_table('Person', Field('name'), format='%(name)s') db.define_table('Relation', Field('name',db.Person), ('contact',db.Person)) db.Relation.name.widget=SQLFORM.widgets.autocomplete(request,db.Person,id_field=db.Person.id) db.Relat