[web2py] Re: In SQLFORM.grid, setting a session var when the user click on search or reset

2017-05-03 Thread Gael Princivalle
he controller that handles the grid. > Please show the code you tried and explain exactly what happened. > > On Monday, May 1, 2017 at 9:49:23 AM UTC-4, Gael Princivalle wrote: >> >> Hello. >> >> I would like to set a session var when the user click in a SQLFORM.grid

[web2py] In SQLFORM.grid, setting a session var when the user click on search or reset

2017-05-01 Thread Gael Princivalle
Hello. I would like to set a session var when the user click in a SQLFORM.grid on the search or reset buttons. I've tried with Ajax but the next page is processed before the session var has been set. Perhaps I can make a modification directly in the web2py files that are called when the user

[web2py] Re: SQLFORM.grid without advanced search

2017-04-25 Thread Gael Princivalle
UTC+2, Gael Princivalle ha scritto: > > Hello. > > Is it possible to customize a SQLFORM.grid for having only the global > search field? > In other words by default when the user click in the global search field > another area is displayed that give the possibility to the user

[web2py] SQLFORM.grid without advanced search

2017-04-24 Thread Gael Princivalle
Hello. Is it possible to customize a SQLFORM.grid for having only the global search field? In other words by default when the user click in the global search field another area is displayed that give the possibility to the user to choose in which field he would like to search. I would like to

[web2py] Image in grid

2017-04-20 Thread Gael Princivalle
Hello. Is there a way to display an image in a grid? Model: db.define_table('schemes', Field('name', type='string', requires=IS_NOT_EMPTY()), Field('description', type='string'), Field('image_file', 'upload')) Thanks. -- Resources: -

[web2py] Worker active but don't process anything

2017-03-10 Thread Gael Princivalle
Hello. I can see my worker in putty with: ps -u tasko w 16975 ?S 37:34 /usr/local/bin/python2.7 /home/tasko/webapps/w2p_2_14_16/web2py/web2py.py -K mtbconnection In the db: wf-31-170-123-65.webfaction.com#16975 Status active. Last hartbeat 09/03/2017 21:32:18 Worker stats

Re: [web2py] Re: SystemExit: 1 ticket on scheduler

2017-03-03 Thread Gael Princivalle
This sys.exit(1) error was for all the workers of all my applications in the same web2py installation. I've set know for all scheduler tasks the 'Prevent drift' option and it seems to works. Il giorno giovedì 2 marzo 2017 21:16:04 UTC+1, Gael Princivalle ha scritto: > > Hello. > &g

[web2py] Re: HTTP_FROM

2017-03-03 Thread Gael Princivalle
Yes thanks. I'll get it with request.env.http_from. Let's try. Il giorno venerdì 3 marzo 2017 14:56:13 UTC+1, Marlysson Silva ha scritto: > > This is a key of http header? > > Em sexta-feira, 3 de março de 2017 09:00:20 UTC-3, Gael Princivalle > escreveu: >> >>

[web2py] HTTP_FROM

2017-03-03 Thread Gael Princivalle
Hello. Is there a way to get the value of HTTP_FROM? I would like to use it for checking if value is googlebot(at)googlebot.com, and redirect the url for avoiding tickets with my ajax functions. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] Re: SystemExit: 1 ticket on scheduler

2017-03-02 Thread Gael Princivalle
Il giorno martedì 31 gennaio 2017 10:08:18 UTC+1, Gael Princivalle ha scritto: > > Ok probably a timing out due to the https call that has not replied in > less than 60 sec (the timeout of the task). > I've set now retry_failed to -1. > > Thanks. > > -- &

[web2py] Custom function for auth emails

2017-02-21 Thread Gael Princivalle
Hello. I've got a strange problem. When a user make the registration, I send an email to my mailbox. I've got it immediately. The Email verify message arrive to this new user after around five minutes. Someone knows why? Can I make a custom function that will send all the auth messages like

Re: [web2py] Re: Smarthumb computed fields not computed after register

2017-02-19 Thread Gael Princivalle
I've found why there was a difference between these similar situations. First of the os.path.exists test I need to add a test for checking if the field is empty or not: if user.image_user32x32: -- Gael Princivalle 2017-02-19 7:58 GMT+01:00 Gael Princivalle <gaelprinc

[web2py] Re: Smarthumb computed fields not computed after register

2017-02-18 Thread Gael Princivalle
Thank you Leonel but u.image_user16x16 contains always the file name, so the test will return always True. The problem is that the image file is not created on the disk so I have to test if it exist. At this point it's not so easy to do. The application call for these computed images from the

[web2py] Re: Agree on some terms before registration

2017-02-18 Thread Gael Princivalle
Hello. Here is a complete solution without the use of a custom form. auth.settings.extra_fields['auth_user']= [ Field('agree_terms_and_conditions','boolean', label=T('I agree to terms and conditions'),default=False,requires=IS_NOT_EMPTY(error_message=T('You must agree the term

Re: [web2py] Re: Smarthumb computed fields not computed after register

2017-02-18 Thread Gael Princivalle
Thanks but it returns also False: if os.path.exists(URL('download', 'default', args=auth.user.image_user16x16)): Does it work if you do a similar test? -- Gael Princivalle 2017-02-18 14:27 GMT+01:00 Nico de Groot <ndegro...@gmail.com>: > Use os.path.exists()

[web2py] Re: Smarthumb computed fields not computed after register

2017-02-18 Thread Gael Princivalle
I can do that? Thanks. Il giorno venerdì 17 febbraio 2017 11:34:14 UTC+1, Gael Princivalle ha scritto: > > Thank you Leonel but I think it don't resolve the bug. Perhaps I've done > something wrong. > > I've already some actions to do for both events so I've some lambda > fu

[web2py] Re: 2 email configurations

2017-02-17 Thread Gael Princivalle
; other_mail.settings.login = 'username:password' > > > > And for sending emails > > other_mail.send('y...@example.com ','Message subject', > 'Plain text body of the message') > > > On Friday, February 17, 2017 at 2:10:48 AM UTC+5:30, Gael Princivalle &

[web2py] Re: Smarthumb computed fields not computed after register

2017-02-17 Thread Gael Princivalle
Thank you Leonel but I think it don't resolve the bug. Perhaps I've done something wrong. I've already some actions to do for both events so I've some lambda functions (I've take off the other things from the functions): auth.settings.profile_onaccept = lambda form: profile_onaccept(form)

[web2py] 2 email configurations

2017-02-16 Thread Gael Princivalle
Hello. I use a mailgun smtp for large invoices. It works fine but the invoice could begin after a couple of minutes. I use registration requires verification: auth.settings.registration_requires_verification = True If the user wait for this email verification for 2 minutes he could think

[web2py] Smarthumb computed fields not computed after register

2017-02-16 Thread Gael Princivalle
Hello. I've add Smartthumb computed fields in auth_user. Smarthumb compute images: http://www.web2pyslices.com/slice/show/1522/generate-a-thumbnail-that-fits-in-a-box In the model: auth.settings.extra_fields['auth_user']= [ Field('image_user', 'upload', label=T('Profile user image'),

[web2py] Re: Query on a field from a referenced field

2017-02-16 Thread Gael Princivalle
Thank you Leonel for this solution that works perfectly. I've to study more the complex queries. Il giorno mercoledì 15 febbraio 2017 00:39:16 UTC+1, Leonel Câmara ha scritto: > > One way to do it would be to use *belongs* > > user_event_ids = db(db.events_users.created_by ==

[web2py] Query on a field from a referenced field

2017-02-14 Thread Gael Princivalle
Hello. Calling a field from a referenced field is not possible. Ticket is 'Field' object has no attribute 'event_datetime'. Model: db.define_table('events', Field('title', type='string'), Field('event_datetime', type='datetime'), auth.signature) db.define_table('events_users',

[web2py] Re: Calling controller from javascript

2017-02-12 Thread Gael Princivalle
Hello. You can do it with ajax: $.ajax({ type: "POST", url: "{{=URL('f_ajax','get_user_events')}}", data:{east, west, south, north, user_period, userId}, success: function( returnedData ) { $(

Re: [web2py] Re: SystemExit: 1 ticket on scheduler

2017-01-31 Thread Gael Princivalle
Ok probably a timing out due to the https call that has not replied in less than 60 sec (the timeout of the task). I've set now retry_failed to -1. Thanks. -- Gael Princivalle 2017-01-31 8:45 GMT+01:00 Niphlod <niph...@gmail.com>: > or it got a SIGTERM, or it was t

Re: [web2py] Re: SystemExit: 1 ticket on scheduler

2017-01-31 Thread Gael Princivalle
>Is that the traceback from the associated record in the scheduler_run table? Yes -- Gael Princivalle 2017-01-30 22:16 GMT+01:00 Anthony <abasta...@gmail.com>: > Looks like maybe an error somewhere in your model files. Is that the > traceback from the as

[web2py] SystemExit: 1 ticket on scheduler

2017-01-30 Thread Gael Princivalle
Hello. I've got a scheduler function that run each 30 seconds for sending web push notifications: def process_webn_alerts(): webn_alerts = db(db.alerts.instant_webn_status == 1).select() for webn_alert in webn_alerts: onesignal_players = db(db.onesignal_players.created_by ==

[web2py] Re: Set the Atom Editor to auto complete web2py

2017-01-25 Thread Gael Princivalle
Hello Rafael. Did you find a solution? Il giorno giovedì 8 settembre 2016 02:30:49 UTC+2, Rafael Oliveira ha scritto: > > > Good Morning. I wanted to set the Atom Editor to auto complete web2py, > already tried in some tutorials and I can not. I use Windows 10. I managed > to make Python auto

Re: [web2py] Re: Web2py app on Android/IOS with notifications

2017-01-19 Thread Gael Princivalle
>Or better yet, configure your web server to serve those files directly, without hitting web2py at all. Yes that's the better solution, thanks. -- Gael Princivalle 2017-01-17 20:20 GMT+01:00 Anthony <abasta...@gmail.com>: > On Tuesday, January 17, 2017 at 2:01

[web2py] Re: Web2py app on Android/IOS with notifications

2017-01-17 Thread Gael Princivalle
.txt'), ) routes_out = () And with this system I don't know how I can manage translate the actual functions of my parametric routes.py. Il giorno martedì 17 gennaio 2017 17:54:39 UTC+1, Anthony ha scritto: > > On Tuesday, January 17, 2017 at 9:50:53 AM UTC-5, Gael Princivalle wrote: >> >>

[web2py] Re: Web2py app on Android/IOS with notifications

2017-01-17 Thread Gael Princivalle
tifications, which of > course can be used from web2py -- but there's nothing web2py specific). > > Anthony > > On Sunday, January 15, 2017 at 9:15:29 AM UTC-5, Gael Princivalle wrote: >> >> Hello. >> >> There is a really interesting post about Web2py

[web2py] Web2py app on Android/IOS with notifications

2017-01-15 Thread Gael Princivalle
Hello. There is a really interesting post about Web2py integration in Android or IOS platforms: https://groups.google.com/forum/#!searchin/web2py/web2py$20mobile$20app|sort:relevance/web2py/1ZxFEB5j4XA/-v7_FvsKFQAJ Someone knows if there's a way to send to the mobile phone some notifications

[web2py] Re: import csv that can update some existing data in existing table

2017-01-12 Thread Gael Princivalle
Hi Stifan. I do it like that, for example for a table called cm1: import os from cStringIO import StringIO #Original table db.define_table('cm1', Field('code', type='integer'), Field('title_en', type='string'), Field('title_it', type='string'))

Re: [web2py] add_button to go to the previous page

2017-01-12 Thread Gael Princivalle
I use this solution, not so 'beautiful' but it works. In the layout I save the current URL like this: {{current_url = URL(args=request.args, vars=request.get_vars)}} I do it in the layout like that I'm sure to always doing it. After that you can add where you need it in a link this current_url

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-07 Thread Gael Princivalle
Ok I've found the problem. In the title I've hadded before a date with a different encode. Thanks Leonel for the help. Il giorno sabato 7 gennaio 2017 09:12:19 UTC+1, Gael Princivalle ha scritto: > > I've tried also like that: > description = title + 'ò' > Same error. > > de

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-07 Thread Gael Princivalle
I've tried also like that: description = title + 'ò' Same error. description = '%s %s' %(title, event.description) Same error. description = 'ò' No error. Il giorno venerdì 6 gennaio 2017 19:23:16 UTC+1, Gael Princivalle ha scritto: > I edit the controller with notepad ++. Format is UT

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-06 Thread Gael Princivalle
I edit the controller with notepad ++. Format is UTF-8 without BOM. I've also tried to save it with the web2py amministrative interface, same error. Il giorno venerdì 6 gennaio 2017 18:08:13 UTC+1, Leonel Câmara ha scritto: > > Is it possible the python file itself where your controller is, is

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-06 Thread Gael Princivalle
PostGis is in utf8. I've tried to force the utf8 codification like that: description = title + ' ' + event.description.encode("utf-8") Same error. Il giorno venerdì 6 gennaio 2017 17:27:17 UTC+1, Gael Princivalle ha scritto: > > Hello. > > I'm made a new appli

[web2py] 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-06 Thread Gael Princivalle
Hello. I'm made a new application in a new web2py installation 2.14.6. The db is PostGis. It's a mountain bike meeting platform. There's only one user for the moment, myself ☺. Here is an event: https://www.mtbconnection.com/en/mtb_ride?event_id=1 You can see that the event description is: Per

Re: [web2py] Row position change if I switch from a file to another

2016-12-31 Thread Gael Princivalle
I use now Notepad ++ with the ftp plugin NppFTP, very useful. Of course when the application will be in production I'll have to test in local the changes before uploading. Thanks for your help. Il giorno mercoledì 28 dicembre 2016 11:50:59 UTC+1, Áureo Dias Neto ha scritto: > > You can then

[web2py] Datetime field for dmY H:M / Ymd H:M / mdY H:M format

2016-12-30 Thread Gael Princivalle
Hello. I'm still working on an application that could be used potentially worldwide. There is a lot of different ways to order the datetime data in the world: https://en.wikipedia.org/wiki/Date_format_by_country Anyway it could not be the language to set it, but the user must do it in his user

[web2py] Shared worker

2016-12-29 Thread Gael Princivalle
Hello. I've five applications in the same web2py installation. For each of these applications I have a set a worker that run task in the scheduler. These tasks run one time per day (database csv backup and sitemap). Is there a way to use one unique worker for these 5 applications? I would like

Re: [web2py] Row position change if I switch from a file to another

2016-12-28 Thread Gael Princivalle
ias Neto ha scritto: > > Good morning, > > The best to do, is, use a external editor of your choice, ex: sublime > text, to edit the files by path > > 2016-12-28 7:53 GMT-02:00 Gael Princivalle <gaelpri...@gmail.com > >: > >> Hello all. >> >>

[web2py] Row position change if I switch from a file to another

2016-12-28 Thread Gael Princivalle
Hello all. In the administrative interface, if I'm still working on the default.py file row 234, and I switch to menu.py row 25, when I turn back to default.py I'm not anymore in the same row, 234, but 16. It's not user friendly as I have to scroll down and up all the time. Is there a way to

[web2py] Re: Subquery question

2016-12-12 Thread Gael Princivalle
I have to learn more about it. I've choose geometry as geography don't support st_within that'is the function that I need for testing in a point is inside a map area. Il giorno lunedì 12 dicembre 2016 20:46:47 UTC+1, Pierre ha scritto: > > > my guess is you are not "feeding" the geometry field

[web2py] Re: Subquery question

2016-12-12 Thread Gael Princivalle
Thank you Pierre I've add this field to the db: Field('geopoint', 'geometry()', compute=lambda r: 'POINT({0} {1})'.format( float(r['longitude']),float(r['latitude']))), and I've also substitute the geometry filed with this new geopoint filed in the query: events_comments =

[web2py] Subquery question

2016-12-11 Thread Gael Princivalle
Hello everybody. I don't find the solution for selecting what I need, selecting comments for events in a specific area. DB: #Events table with a geometry fields. I use a PostGis DB. db.define_table('events', Field('title', type='string', requires=IS_NOT_EMPTY(), label=T('Title' )),

[web2py] json field is completely displayed in database amministration

2016-12-11 Thread Gael Princivalle
Hello. I've in a table a json field: Field('json_forecast', type='json'), The values of this json field are completely displayed in the database administration interface, and as we talk about more than 3000 characters per row, it's not possible to use it. Is there a way to resolve it, like

[web2py] Re: Starting scheduler worker from controller

2016-12-09 Thread Gael Princivalle
Ok I've made the perfect system that start a new worker when it's necessary. My problem is that web2py don't run the tasks and I don't know why (so my system is not so perfect!!). I've add this task in the scheduler. It only save a file "alert_file.txt": def save_alert_file(): file =

[web2py] Starting scheduler worker from controller

2016-11-17 Thread Gael Princivalle
Hello. Is it possible to run a scheduler worker from a controller? Restarting a server kill all workers. I would like to run my workers automatically if the last heartbeat is old. The standard way is going to ssh and running : nohup python web2py.py -K application_name & I would like to have

[web2py] Re: Sending two different emails with auth.settings.register_onaccept

2016-11-17 Thread Gael Princivalle
Thank you Stifan. Il giorno martedì 15 novembre 2016 20:50:39 UTC+1, 黄祥 ha scritto: > > perhaps you can use a function > *e.g.* > *models/db.py* > auth.settings.register_onaccept = lambda form: registration_send_mail(form) > > def registration_send_mail(form): > #1st send_mail > #2nd send_mail >

[web2py] Sending two different emails with auth.settings.register_onaccept

2016-11-15 Thread Gael Princivalle
Hello. Actually my app send one email when the user registration is accepted: auth.settings.register_onaccept = lambda form: mail.send(to=i...@domain.com ',subject='New user on domain.com',message='New user is First name: ' + form.vars.first_name + 'Last name: ' + form.vars.last_name + '') How

[web2py] Re: Fetching rows with st_asgeojson()

2016-10-09 Thread Gael Princivalle
vents.track_quotation]), > "geometry": loads_json(event[db.events.geometry.st_asgeojson()]) > } > features.append(item) > > > > > > On Saturday, 17 September 2016 12:57:29 UTC-5, Gael Princivalle wrote: >> >> Someone have an ide

[web2py] Re: auth.settings messages

2016-10-09 Thread Gael Princivalle
t sure what's going on. Does it work if you explicitly set > auth.messages.verify_email to T('your message')? > > Anthony > > On Sunday, October 9, 2016 at 4:46:12 AM UTC-4, Gael Princivalle wrote: >> >> That's strange. >> >> So if the current uri_language is

[web2py] Re: auth.settings messages

2016-10-09 Thread Gael Princivalle
s.py#L1894> > > is an instance of gluon.storage.Messages > <https://github.com/web2py/web2py/blob/e6a3081b42ecd58441419930266baf286561c4c7/gluon/storage.py#L190>, > > so all messages are automatically translated via current.T. No need to > wrap anything in T(). > > A

[web2py] auth.settings messages

2016-10-08 Thread Gael Princivalle
Hello. Here we can change the auth.settings messages: http://web2py.com/books/default/chapter/29/09/access-control#Auth-Settings-and-messages For a multilingual website it's necessary changing: auth.messages.verify_password = 'Verify Password' to auth.messages.verify_password = T('Verify

[web2py] Re: replaced by × in url

2016-09-19 Thread Gael Princivalle
http://stackoverflow.com/questions/16834320/using-times-word-in-html-changes-to-%C3%97 > . > > Anthony > > On Monday, September 19, 2016 at 9:31:17 AM UTC-4, Gael Princivalle wrote: >> >> Hello. >> >> When I build this URL: >> url = URL('/maps/api/timez

[web2py] replaced by × in url

2016-09-19 Thread Gael Princivalle
Hello. When I build this URL: url = URL('/maps/api/timezone/json', scheme='https', host= 'maps.googleapis.com', vars=dict(key='mykey', location=str(events_latitude) + ',' + str(events_longitude), timestamp=str(today_UTC_timestamp))) "" is replaced by "×":

[web2py] Form forget selected file

2016-09-18 Thread Gael Princivalle
Hello all. When a form is submitted with errors, if the user have choose first a file in this form, this choice is not reminded for the next submission attempt. Is there's a way to remind this choice? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Fetching rows with st_asgeojson()

2016-09-17 Thread Gael Princivalle
"track_quotation": str(event[db.events.track_quotation]) }, "geometry": loads_json(event[db.events.geometry.st_asgeojson()])} for event in events] But I would like to traduce it in a loop like that: for event in events: ... Il giorno martedì 13 settembre 2016 15:36:3

[web2py] Fetching rows with st_asgeojson()

2016-09-13 Thread Gael Princivalle
Hello. Can someone explain me why when I use this set of rows: events= db(db.events.id>0).select(db.events.id, db.events.title, db.events.geometry.st_asgeojson()) I can't call my rows with event.title but with event[db.events.title] ? It's a problem because if I would like to call for a

[web2py] Comment for auth.auth_user.email

2016-09-11 Thread Gael Princivalle
Hello. I would like to add a to auth.auth_user.email a comment like comment=('Only for login and service communication, not displayed to other users'). Is it possible? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] st_within example

2016-09-08 Thread Gael Princivalle
Hello. Could someone give me an example of the postgis st_within function? http://postgis.org/docs/ST_DWithin.html Model db.define_table('places', Field('loc', 'geometry()')) Where I insert 3 geoPoints: geoPoint(1, 1) geoPoint(3, 2) geoPoint(6, 5) query = db.places.loc.st_within(geoPoint(0,

[web2py] Find rows wich are from x meters from a point with st_distance

2016-09-07 Thread Gael Princivalle
Hello. I'm trying to select all rows within X meters from a lat/long point. These was already discussed here: https://groups.google.com/forum/#!searchin/web2py/st_distance|sort:relevance/web2py/Js8amC9SMoY/Ds-X3ysFAgAJ Anyway I don't reach to find the way to have the good result. Here is the db

[web2py] Re: Update javascript object by ajax

2016-09-06 Thread Gael Princivalle
.getJSON instead of $.get. > > which those changes what errors do you get? > > On Monday, 5 September 2016 15:51:44 UTC-5, Gael Princivalle wrote: >> >> Thanks Dave. >> >> However I'm still having trouble. >> >> With that script in the view google maps AP

[web2py] Re: Update javascript object by ajax

2016-09-05 Thread Gael Princivalle
response.json(locations) Javascript error still the same. Can someone give me a hand? Thanks. Il giorno sabato 6 agosto 2016 01:14:43 UTC+2, Dave S ha scritto: > > > > On Friday, August 5, 2016 at 2:26:51 PM UTC-7, Gael Princivalle wrote: >> >> Hello. >> >> I wo

[web2py] Re: File widget traduction

2016-09-05 Thread Gael Princivalle
> nothing in specific language file, how can web2py translate it ? > > On Saturday, September 3, 2016 at 11:07:06 AM UTC+2, Gael Princivalle > wrote: >> >> Hello. >> >> I've add in a custom form this field: >> {{=form_event.custom.widget.cover_image}} >&g

[web2py] Re: File widget traduction

2016-09-05 Thread Gael Princivalle
Somebody have a solution? Il giorno sabato 3 settembre 2016 11:07:06 UTC+2, Gael Princivalle ha scritto: > > Hello. > > I've add in a custom form this field: > {{=form_event.custom.widget.cover_image}} > > Language still English. > 'Browse...' and 'No file selected

[web2py] File widget traduction

2016-09-03 Thread Gael Princivalle
Hello. I've add in a custom form this field: {{=form_event.custom.widget.cover_image}} Language still English. 'Browse...' and 'No file selected.' don't appear in it.py. Probably I have to add the T() to both text in this widget. How can I do it? Thanks. -- Resources: - http://web2py.com -

[web2py] Re: Retrieving record id after form.process().accepted

2016-08-25 Thread Gael Princivalle
Thank you Anthony. Il giorno mercoledì 24 agosto 2016 19:21:03 UTC+2, Anthony ha scritto: > > form.vars.id > > On Wednesday, August 24, 2016 at 12:47:53 PM UTC-4, Gael Princivalle wrote: >> >> Hello. >> >> How can I retrieve the record id when the form

[web2py] Re: Retrieve custom form input/select value in case of errors

2016-08-25 Thread Gael Princivalle
t_name.attributes['_value'] = 'Martin' > return dict(form=form) > > > > > > Dne středa 24. srpna 2016 19:19:25 UTC+2 Gael Princivalle napsal(a): >> >> Thank you Mirek for that. >> Like that it works: >> {{=INPUT(_type='text', _name='book_title', _id='book_title

[web2py] Re: Retrieve custom form input/select value in case of errors

2016-08-24 Thread Gael Princivalle
agosto 2016 17:20:20 UTC+2, Mirek Zvolský ha scritto: > > form.vars.book_title ? (book, chapter 7) > > > > > Dne úterý 23. srpna 2016 13:47:34 UTC+2 Gael Princivalle napsal(a): >> >> Hello. >> >> In a custom form when the user submit the form with errors

[web2py] Retrieving record id after form.process().accepted

2016-08-24 Thread Gael Princivalle
Hello. How can I retrieve the record id when the form is accepted? I would like to use it for redirection. if form.process().accepted: redirect(URL('default', 'book', vars=dict(book_id=???))) Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Retrieve custom form input/select value in case of errors

2016-08-23 Thread Gael Princivalle
Hello. In a custom form when the user submit the form with errors I need to reload all user inputs and set the input value. For example here is an input: {{=INPUT(_type='text', _name='book_title', _id='book_title')}} How can I do that ? As there is available on form errors

[web2py] Re: Bootstrap 3 datepicker

2016-08-23 Thread Gael Princivalle
at='%d.%m.%Y %H:%M')] > > > And you can use T('%d.%m.%Y %H:%M') and translate format for different > locales. > > > > > Dne neděle 21. srpna 2016 15:28:18 UTC+2 Gael Princivalle napsal(a): >> >> Hello. >> >> I'm trying to use Bootstrap 3 datepicker. >

[web2py] Re: response.flash is not displayed

2016-08-21 Thread Gael Princivalle
gt; Anthony > > On Saturday, August 20, 2016 at 9:58:10 AM UTC-4, Gael Princivalle wrote: >> >> Hello. >> >> I would like to have more info about how web2py add the inline style >> 'display: block;' to . >> >> With my own bootstrap 3 layout on a 2_

[web2py] Bootstrap 3 datepicker

2016-08-21 Thread Gael Princivalle
Hello. I'm trying to use Bootstrap 3 datepicker. http://eonasdan.github.io/bootstrap-datetimepicker/ Edward have already use it: https://groups.google.com/d/topic/web2py/ZRS6PN-Ais4/discussion I use it for datetime, the result in the input is like: 03/09/2016 14:00 The form returns me an error

[web2py] Re: [SOLVED] Re: How to disable the calendar widget?

2016-08-21 Thread Gael Princivalle
Hi Edward. I'm trying also to use Bootstrap 3 datepicker. http://eonasdan.github.io/bootstrap-datetimepicker/ I use it for datetime, the result in the input is like: 03/09/2016 14:00 The form returns me an error as it need also the seconds like: 03/09/2016 14:00:00 The seconds for this

[web2py] Re: Form custom input errors

2016-08-21 Thread Gael Princivalle
not necessary to custom the input this is better (in the manual): {{=form_new_event.custom.widget.event_datetime}} Il giorno lunedì 8 agosto 2016 22:45:28 UTC+2, Niphlod ha scritto: > doesn't form.errors[fieldname] store the error ? > > On Monday, August 8, 2016 at 9:51:53 PM UTC+2, Gael Pr

[web2py] response.flash is not displayed

2016-08-20 Thread Gael Princivalle
Hello. I would like to have more info about how web2py add the inline style 'display: block;' to . With my own bootstrap 3 layout on a 2_12_13 web2py install response.flash is displayed. With quite the same layout on a 2_14_16 web2py install it's not displayed. With the standard layout it's

[web2py] Form custom input errors

2016-08-08 Thread Gael Princivalle
Hello. Is it possible in a custom form to display the individual input errors like "Invalid email", if in the field of a table we have the validator IS_EMAIL ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Update javascript object by ajax

2016-08-05 Thread Gael Princivalle
Hello. I would like to update a javascript array by ajax, keeping the data into the db. We talk about markers data for Google maps. Here is how I load the data when the page is loaded. var locations = [ {{for event in events:}} {title: '{{=event.title}}',

[web2py] Re: Interface for many to many relationship

2016-08-05 Thread Gael Princivalle
have is another > derivation of skills and etc... > > > > > > > On Friday, August 5, 2016 at 11:38:55 AM UTC-4, Gael Princivalle wrote: >> >> Hello all. >> >> I have a many to many relationship like that: >> >> db.define_table('skills'

[web2py] Interface for many to many relationship

2016-08-05 Thread Gael Princivalle
Hello all. I have a many to many relationship like that: db.define_table('skills', Field('name', type='string', requires=IS_NOT_EMPTY()), format='%(name)s') db.define_table("projects", Field('title', type='string', requires=IS_NOT_EMPTY()),

[web2py] Host configuration

2016-08-02 Thread Gael Princivalle
Hello. Someone can give some examples about the use of the Host configuration in appconfig.ini? Thanks. -- 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) ---

[web2py] Re: Excel like filter in grid

2016-07-28 Thread Gael Princivalle
o grid or a table. > Thank you Gael for sharing. Great work ! > > On Wednesday, July 27, 2016 at 6:58:36 AM UTC-4, Marlysson Silva wrote: >> >> @Gael Princivalle , good code, you could to post this code in GitHub , so >> everybody could see your code and can improvement

[web2py] Re: Excel like filter in grid

2016-07-26 Thread Gael Princivalle
equest. Does the number of > criteria combinations affect performance? > > On Tuesday, July 26, 2016 at 2:26:16 AM UTC-5, Gael Princivalle wrote: >> >> Done it: >> http://www.hydrover.it/en/search_product >> >> Thank's again to all the web2py community for the

[web2py] Re: Excel like filter in grid

2016-07-26 Thread Gael Princivalle
Done it: http://www.hydrover.it/en/search_product Thank's again to all the web2py community for the support. If someone need to do a similar job I'll be happy to give a help. Il giorno mercoledì 13 aprile 2016 17:29:27 UTC+2, Gael Princivalle ha scritto: > > Hello. > > I would

Re: [web2py] Re: Reopen a session without cookies

2016-06-28 Thread Gael Princivalle
Hello. Do you have got success with the Telegram integration ? Can you post the URL where is it ? Il giorno sabato 12 settembre 2015 17:54:39 UTC+2, mweissen ha scritto: > > Thx! I put a variable in db.py, use it as a global variable and save the > content as json field for the next round. > >

[web2py] Re: SELECT without duplicates for a specific field

2016-06-15 Thread Gael Princivalle
db(db.table.reference == db.referencedtable.id).select( > db.referencedtable.Field, orderby=db.referencedtable.Field, groupby=db > .table.reference, join=(db.table.on(db.referencedtable.id == > db.table.reference))) > > > On Tuesday, June 14, 2016 at 4:55:43 PM UTC+3, Gael Pr

[web2py] Re: SELECT without duplicates for a specific field

2016-06-14 Thread Gael Princivalle
gt; On Monday, June 13, 2016 at 6:31:33 PM UTC+3, Gael Princivalle wrote: >> >> New model: >> db.define_table('categories): >> Field('title', type='string')) >> >> db.define_table('products'): >> Field('code', type='string'), >>

[web2py] Re: SELECT without duplicates for a specific field

2016-06-14 Thread Gael Princivalle
, groupby=db.products.category) > > You probability forget the "s" at name of table "products" , I think it so > . > > Em segunda-feira, 13 de junho de 2016 12:31:33 UTC-3, Gael Princivalle > escreveu: >> >> New model: >> db.define_table('categories):

[web2py] Re: SELECT without duplicates for a specific field

2016-06-13 Thread Gael Princivalle
e a given category_code. > Say you want the first item with a given category code: > > sub_query = db()._select(db.products.id.min(), groupby=db.products. > category_code) > results = db(db.products.id.belongs(sub_query)).select() > > > On Wednesday, 8 June 2016 15:10

[web2py] SELECT without duplicates for a specific field

2016-06-08 Thread Gael Princivalle
Hello. Is there a way to select some rows without duplicates for a specific field ? MODEL: db.define_table('products'): Field('code', type='string'), Field('category_code', type='integer')) ROWS: code / category_code A1125 / 3 C2214 / 2 D235 / 3 Z886 / 1 I would like to make a select

[web2py] Update grid by Ajax callback

2016-06-07 Thread Gael Princivalle
Hello. I would like to update a grid using an Ajax callback like: {{=A('click me', callback=URL('myaction'), target="t")}} {{=grid}} Is it possible ? If yes how can I build the myaction function ? def myaction(): grid = SQLFORM.grid(db.auth_user) ??? return grid Thanks. --

[web2py] Re: relation "auth_user" already exists

2016-04-21 Thread Gael Princivalle
b2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=fake#Migration-control-summary > > Have you tried setting both migrate and fake_migrate_all to True? > > On Wednesday, April 20, 2016 at 4:34:50 PM UTC-4, Gael Princivalle wrote: >> >> Hello. >

[web2py] relation "auth_user" already exists

2016-04-20 Thread Gael Princivalle
Hello. I'm still having some pain with DAL connection strings and migrations. In one application my DAL connection string is like that: DAL('postgres://username:password@localhost:5432/postg_db', check_reserved=[ 'all'], pool_size=1, entity_quoting=True, bigint_id=True, migrate=False,

[web2py] Excel like filter in grid

2016-04-13 Thread Gael Princivalle
Hello. I would like to make a grid with some drop down menus for filtering results. Is there already something that exist ? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Online manual like the web2py book

2016-03-25 Thread Gael Princivalle
Hello to everybody. I have to build in a app an online manual for electronic control cards like Arduino, but dedicated to Hydraulic applications like aerial platforms, cranes. As the product have a lot of functions and potentially applications, manual will have something like 500 pages.

Re: [web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-02-26 Thread Gael Princivalle
Just wait to publish, I've saw in the thread other updates to apply. -- Gael Princivalle 2016-02-27 6:29 GMT+01:00 Gael Princivalle <gaelprinciva...@gmail.com>: > Hello Massimo. > > I've saw that some of these website companies are offline: > http://web2p

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-02-26 Thread Gael Princivalle
Hello Massimo. I've saw that some of these website companies are offline: http://web2py.com/init/default/support I suggest to delete these websites from the support list. Best regards. Il giorno venerdì 26 febbraio 2016 14:50:26 UTC+1, Gael Princivalle ha scritto: > > Hello M

  1   2   3   4   >