[web2py] Re: web2py redirect to a incorrect page

2015-10-31 Thread Massimo Di Pierro
It is a bug in the book. should be On Friday, 30 October 2015 23:04:30 UTC-5, Yibing Liu wrote: > > I am learning web2py. I found a redirect error between 2 very simple > actions. This application which I simple modify from the web2py manual is > just used to help me to understand the con

[web2py] Re: web2py redirect to a incorrect page

2015-10-31 Thread Anthony
FYI, I answered this on SO , and I have already fixed the book on Github. Anthony On Saturday, October 31, 2015 at 10:07:22 AM UTC-4, Massimo Di Pierro wrote: > > It is a bug in the book. > > > > > should be > > > > > On Friday, 30 October 2015 23:04

[web2py] Re: 'ascii' codec can't encode character u'\xce' in position 0: o

2015-10-31 Thread Alex Glaros
finally, adding encode clause worked: {{for x in location_data_from_postal_code['postalcodes']:}} {{countryCode=x['countryCode']}} {{adminCode1=x['adminCode1']}} {{adminName1=x['adminName1'].encode('utf-8')}} {{adminCode2=x['adminCode2']}} {{adminName2=x['adminName2']}} -- Resources: - http

[web2py] Re: Using web2py's template parser in an interesting way.

2015-10-31 Thread Leonel Câmara
Why? This seems awfully complicated given that browsers now support svg, why do we need to convert to png? Even if you do want to convert to PNG wouldn't it be better to have a compute field and save a PNG version there. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: 'ascii' codec can't encode character u'\xce' in position 0: o

2015-10-31 Thread Alex Glaros
for the benefit of anyone else learning to use GeoNames API, some of the fields are missing, which requires some type of handling {{if 'adminCode1' in x:}} {{adminCode1=x['adminCode1'].encode('utf-8')}} {{ else:}} {{adminCode1=''}}{{pass}} -- Resources: - http://web2py.com - http://web2py.com/

[web2py] Re: web2py redirect to a incorrect page

2015-10-31 Thread Massimo Di Pierro
Thank you Anthony On Saturday, 31 October 2015 09:31:41 UTC-5, Anthony wrote: > > FYI, I answered this on SO , > and I have already fixed the book on Github. > > Anthony > > On Saturday, October 31, 2015 at 10:07:22 AM UTC-4, Massimo Di Pierro > wrote:

[web2py] How to define DAL for DB2 adapter

2015-10-31 Thread ffkcum
I'm new to Python world and based on the recommendation web2py is the easiest way to learn about data and web integration. I need to access IBM DB2 database in AS400 to interact with web page. I been reading the guidelines, I define db2 connection string in private/appconfig with db2://usernam

Re: [web2py] blog post on web2py + db2

2015-10-31 Thread ffkcum
I have the same situation here, manage to connect as400 from the shell, but if i use web2py it fails Is this problem already has a solution? If yes, please advise THX On Tuesday, September 6, 2011 at 2:07:50 PM UTC-7, Ramos wrote: > > I tried the DAL Example and i could not connect to my

Re: [web2py] blog post on web2py + db2

2015-10-31 Thread Massimo Di Pierro
This is what the examples indicate as db2 syntax, and it depends on the driver you have 'db2:ibm_db_dbi://DSN=dsn;UID=user;PWD=pass' 'db2:pyodbc://driver=DB2 ;hostname=host;database=database;uid=user;pwd=password;port=port' On Saturday, 31 October 2015 17:12:11

[web2py] Re: How to define DAL for DB2 adapter

2015-10-31 Thread Massimo Di Pierro
This is what the examples indicate as db2 syntax, and it depends on the driver you have 'db2:ibm_db_dbi://DSN=dsn;UID=user;PWD=pass' 'db2:pyodbc://driver=DB2 ;hostname=host;database=database;uid=user;pwd=password;port=port' On Saturday, 31 October 2015 17:12:11

Re: [web2py] DAL alternatives

2015-10-31 Thread Vinicius Assef
The best scenario I see is defining methods to model classes. For example, centralising queries and business actions like: create_customer(), get_active_employees(), register_student() and so on. -- Vinicius Assef On 30 October 2015 at 12:49, Anthony wrote: > > Well, the only thing that I r

Re: [web2py] DAL alternatives

2015-10-31 Thread Anthony
On Saturday, October 31, 2015 at 8:23:50 PM UTC-4, Vinicius Assef wrote: > > The best scenario I see is defining methods to model classes. > > For example, centralising queries and business actions like: > create_customer(), get_active_employees(), register_student() and so on. > If those are gen

[web2py] Re: how to get user to make boolean = False?

2015-10-31 Thread Ariya Owam-aram
In from field construct in your models. Field('approve', 'boolean', label = T('Approve'), default = False ), A เมื่อ วันเสาร์ที่ 31 ตุลาคม ค.ศ. 2015 7 นาฬิกา 38 นาที 18 วินาที UTC+7, Alex Glaros เขียนว่า: > > Users approve or disapprove items in selection of reco

[web2py] Re: how to get user to make boolean = False?

2015-10-31 Thread Alex Glaros
that is good reply Ariya but just found a reply to another post by Niphlod that fits the situation perfectly https://groups.google.com/forum/m/?fromgroups#!topic/web2py/asCPsD9UGb8 much appreciated, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://githu

Re: [web2py] Re: SQLform grid custom function for delete

2015-10-31 Thread Anthony
On Friday, October 30, 2015 at 11:03:18 PM UTC-4, Yebach wrote: > > The thing is IF I put links = [lambda row: A('',_class='glyphicon > glyphicon glyphicon-remove-sign', > callback=URL('settings','deactivate',vars=dict(table='workers_skills',field > = 'ws_status' > ,value = row.workers_skills.id

Re: [web2py] Re: SQLform grid custom function for delete

2015-10-31 Thread Vid Ogris
I dont have special function for edit. When I click the icon on to edit the record I get this error. I did not wrote any special function. I am using web2py's 2015-11-01 11:38 GMT+08:00 Anthony : > On Friday, October 30, 2015 at 11:03:18 PM UTC-4, Yebach wrote: >> >> The thing is IF I put links =

Re: [web2py] Re: SQLform grid custom function for delete

2015-10-31 Thread Anthony
I see the problem. When the grid involves a join, you must refer to fields within a row via the row.table.field format. However, when you view/edit a record from such a grid, only the record from a single table is shown (i.e., there is no longer a join involved), so you must now refer to fields

Re: [web2py] Re: SQLform grid custom function for delete

2015-10-31 Thread Vid Ogris
Thank you so much. This works like a charm. 2015-11-01 14:24 GMT+08:00 Anthony : > I see the problem. When the grid involves a join, you must refer to fields > within a row via the row.table.field format. However, when you view/edit a > record from such a grid, only the record from a single table