[web2py] Re: Web2py on MySQL 8.0

2022-03-28 Thread Fabio Ceccarani
alle 23:13:20 UTC+1 Fabio Ceccarani ha scritto: > Hi, > I updated Linux Mint to last versione and MySQL was updated from version > 5.7 to version 8.0. > Now my application return this error: > (1043, u'Bad handshake') > > I tried several possible solutions, ins

[web2py] Web2py on MySQL 8.0

2022-03-25 Thread Fabio Ceccarani
Hi, I updated Linux Mint to last versione and MySQL was updated from version 5.7 to version 8.0. Now my application return this error: (1043, u'Bad handshake') I tried several possible solutions, install and reinstall pymysql, etc, etc... but nothing! I tried to install mysq 5.7 but now it's

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-18 Thread Fabio Ceccarani
Thanks Donald, I will look itseem very interesting. Fabio Il giorno domenica 17 giugno 2018 23:02:08 UTC+2, Donald McClymont ha scritto: > > You could have a look at this - > https://github.com/DonaldMcC/gdms/blob/master/views/default/user.html > > It integrates a javascript geolocation plu

[web2py] Re: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-17 Thread Fabio Ceccarani
Hi Dave! I will try your solution. I had not thought to using this metod. Thanks! Fabio Il giorno venerdì 15 giugno 2018 22:12:26 UTC+2, Dave S ha scritto: > > > > On Friday, June 15, 2018 at 6:35:48 AM UTC-7, Fabio Ceccarani wrote: >> >> Ih all, >> >> my si

[web2py] Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-15 Thread Fabio Ceccarani
Ih all, my site do do these operation: 1. geolocalize user in view using html5 navigator.geolocation (classic js code) 2. past latitude and longitude to controller with: ajax('{{=URL("default","mycoords")}}'+'?lat='+position.coords.latitude+'&lon='+position.coords.longitude,[],':eval');

[web2py] Re: Virtual field error in view on Pythonanywhere

2018-01-08 Thread Fabio Ceccarani
7 gennaio 2018 15:21:42 UTC+1, Fabio Ceccarani ha scritto: > > Hi all, > I have 'distance' virtual field definition in controller: > > location = (session.lat, session.lon) > db.courses.distance = Field.Virtual('distance', lambda row: > int(geopy.di

[web2py] Virtual field error in view on Pythonanywhere

2018-01-07 Thread Fabio Ceccarani
Hi all, I have 'distance' virtual field definition in controller: location = (session.lat, session.lon) db.courses.distance = Field.Virtual('distance', lambda row: int(geopy.distance.vincenty(location,(row.courses.lat,row.courses.lng)).km)) and visualization on view: {{=course.distance}} ...

Re: [web2py] Double registration form (one in controller, two in view)

2017-11-27 Thread Fabio Ceccarani
Thanks Richard, your information sooner or later will be usefull again! Fabio Il giorno lunedì 27 novembre 2017 15:45:19 UTC+1, Richard ha scritto: > > That can works too, but with more click... > > Good luck. > > Richard > > On Mon, Nov 27, 2017 at 9:35 AM, Fabio Ce

Re: [web2py] Double registration form (one in controller, two in view)

2017-11-27 Thread Fabio Ceccarani
I went around the problem: I created a page with two buttom (one for profile) that link two differents pages. Any page has its own form and its own controller part that write profile_type field "1" or "2". Thanks anyway! Fabio Il giorno lunedì 27 novembre 2017 12:02:08 UT

Re: [web2py] Double registration form (one in controller, two in view)

2017-11-27 Thread Fabio Ceccarani
of your form... >> >> You can set this in the controller of you form like so : >> >> db.auth_user.profile_type.default = PROFILE_TYPE_YOU_PREFER >> >> default is for create form and update is in context of an record update >> obviously... >> >

[web2py] Double registration form (one in controller, two in view)

2017-11-24 Thread Fabio Ceccarani
Hi all, I have a double registration form (one in controller, two in view): IN DB.PY auth.settings.extra_fields['auth_user']= [ Field('profile_type', readable=False, writable=False, label='Profile type', requires=IS_IN_SET({1:'Person',2:'Organization'})), ... ] IN USER.HTML ... profile

[web2py] Re: Paypal fields integration in FORM

2017-04-03 Thread Fabio Ceccarani
;form as usual to the PayPal URL. > > Anthony > > On Friday, March 31, 2017 at 5:22:14 AM UTC-4, Fabio Ceccarani wrote: >> >> Hi all, >> I have this FORM with some fields + paypal fields and paypal action: >> >> form = FORM( >> H1("SUBMISS

[web2py] Paypal fields integration in FORM

2017-03-31 Thread Fabio Ceccarani
Hi all, I have this FORM with some fields + paypal fields and paypal action: form = FORM( H1("SUBMISSION AND PAYMENT"), DIV(LABEL("Nome: ",_class="control-label col-sm-3")+DIV(auth.user.first_name,_class="col-sm9"),_class="form-group"), DIV(LABEL("Cognome: ",_class="contr

[web2py] Re: How can I access functions from multiple files in the controllers directory?

2016-11-07 Thread Fabio Ceccarani
Il giorno venerdì 4 novembre 2016 16:55:21 UTC+1, Anthony ha scritto: > > > You have two options. First, you can simply pass any web2py API or global > objects as arguments to functions or class constructors in your module. > Second, you can import the "current" object in your module. It includes

[web2py] Re: How can I access functions from multiple files in the controllers directory?

2016-11-04 Thread Fabio Ceccarani
Hi, usefull response, but in function defined in test.py variables as session, db, request (and other function defined in default.py) are not visible. Is it normal or there's a way to make they somehow global? Or the only way is to past as argument session, db, request? And for call funtions de

[web2py] Re: Problem with migrate. Error with referenced field.

2016-10-12 Thread Fabio Ceccarani
ions file , and restart server to forget some references to user > table. > > Em segunda-feira, 10 de outubro de 2016 11:13:22 UTC-3, Fabio Ceccarani > escreveu: >> >> Hi, >> I have this problem: a table have a field that is a reference to id of >> auth_u

[web2py] Problem with migrate. Error with referenced field.

2016-10-10 Thread Fabio Ceccarani
Hi, I have this problem: a table have a field that is a reference to id of auth_users. BEFORE it was: db.define_table('courses', Field('id_user',db.users), ... NOW is: db.define_table('courses', Field('id_user',db.auth_user), ... Now the table 'users' is n more used. The proble

[web2py] Re: Uploading multiple images in web2py

2016-07-11 Thread Fabio Ceccarani
Thanks Massimo. Il giorno lunedì 11 luglio 2016 08:06:01 UTC+2, Massimo Di Pierro ha scritto: > > At this time there is not. > > On Friday, 8 July 2016 17:42:35 UTC-5, Fabio Ceccarani wrote: >> >> Thanks Ron. >> Thanks Massimo, I have 6 upload fields (img01, img02,

[web2py] Re: Uploading multiple images in web2py

2016-07-08 Thread Fabio Ceccarani
chrome), dropzone is not > necessary as it is the default behavior. All you need to do is use CSS to > style the to make it clear to users they can drop > files there. > > On Tuesday, 5 July 2016 16:28:11 UTC-5, Fabio Ceccarani wrote: >> >> I'm trying with dropzone.js

[web2py] Uploading multiple images in web2py

2016-07-05 Thread Fabio Ceccarani
I'm trying with dropzone.js but I have some difficult to integrate it in sqlform. Someone has used it with sqlform? Thanks Fabio -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/li

[web2py] Re: Retrieve value of dictionary in field with requires=IS_IN_SET(dictcionary)

2016-01-25 Thread Fabio Ceccarani
Il giorno sabato 23 gennaio 2016 20:01:37 UTC+1, DenesL ha scritto: > > web2py will only store the key part (1,2,.. or 5) in the category field. > You have to provide the value part for the key:value pairs. > > courses = {1:'Arte',2:'Artigianato',3:'Cucina',4:'sport',5:'informatica'} > > db.cours

[web2py] Retrieve value of dictionary in field with requires=IS_IN_SET(dictcionary)

2016-01-23 Thread Fabio Ceccarani
Hi all, I create a field with requires=IS_IN_SET where list of values is a dictionary: db.define_table('courses', ... Field('category',requires=IS_IN_SET({1:'Arte',2:'Artigianato',3:'Cucina',4 :'sport',5:'informatica'},zero='Scegli la categoria')) ...) In default.py *result* function ret