[web2py] Re: Can a register_onvalidation function reject registration?

2014-10-05 Thread Leonel Câmara
Yes, you can by adding errors to form.errors or simply setting form.errors = True. -- 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

[web2py] list:string type issues

2014-10-05 Thread Greg Vaughan
Hi Guys, I am using a list:string to store a list of lists. Each seperate list has 4 values, qty (int), name (string), description (text) and price(double). Stores nicely and looks fine in the db table eg. [1, 'OS 7030', 'OS 7030', 755.0], [3, 'SMT 24 Btn', 'SMT IP Phone', 360.0], [1, 'SMT

[web2py] Re: Replacing characters in a csv file from request.vars

2014-10-05 Thread Leonel Câmara
This worked for me: Model: db.define_table('products', Field('id_crm', 'integer'), Field('code'), Field('description', 'text'), Field('price_list', 'decimal(10,5)'), Field('special_offer', 'boolean'), ) Controller: def from_csv(): form = SQLFORM.factory(

[web2py] Re: Replacing characters in a csv file from request.vars

2014-10-05 Thread Gael Princivalle
Shame on me. I've wrote cvstxt instead of csvtxt... Anyway you've teach me some tricks, thanks a lot. Il giorno domenica 5 ottobre 2014 12:41:24 UTC+2, Leonel Câmara ha scritto: This worked for me: Model: db.define_table('products', Field('id_crm', 'integer'), Field('code'),

[web2py] Re: Can a register_onvalidation function reject registration?

2014-10-05 Thread Anthony
Or do a redirect. On Sunday, October 5, 2014 5:46:33 AM UTC-4, Leonel Câmara wrote: Yes, you can by adding errors to form.errors or simply setting form.errors = True. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: list:string type issues

2014-10-05 Thread Anthony
Can you show your code? If you want to store a Python structure, you're probably better off using a json field type, which will automatically serialize back and forth between Python and JSON (the list:string type is meant for storing a list of strings, not a list of Python lists). Anthony On

[web2py] Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
I have a simple controller method where I insert a record in mes table and return the id of inserted record as given below: return db.mes.insert(me=metext,locale=localeid) However it return incorrect id. When I check the id of the record through MySQL workbench it shows some number greater

[web2py] HTML multiple select attribute bug in 2.9.11?

2014-10-05 Thread DJ
Just migrated code from an older version web2py app to the latest code structure (js, css, etc.). The Multiple select box does not show up in the form. I get a disabled dropdown button. The same old app (without js, css updates) works totally fine on the 2.9.11 version. I think this has to do

[web2py] Re: HTML multiple select attribute bug in 2.9.11?

2014-10-05 Thread Niphlod
app reproducing the issue would definitely help investigating what's going on On Sunday, October 5, 2014 9:01:30 PM UTC+2, DJ wrote: Just migrated code from an older version web2py app to the latest code structure (js, css, etc.). The Multiple select box does not show up in the form. I

[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Niphlod
the id returned by DAL is the one mysql sends back as last_insert_id(). Do you have an autoincrement field there ? the only explanation of a wrong id could be that. On Sunday, October 5, 2014 8:56:41 PM UTC+2, Gliese 581 g wrote: I have a simple controller method where I insert a record in

[web2py] Web2py, Apache and Ubuntu 14.04

2014-10-05 Thread Martin Weissenboeck
One of my servers uses Ubuntu 13.04. Today I have changed to Ubuntu 14.04 and now it is not possible to access the webpage. There is a lot of discussions about this topic in the net and I tried to follow these hints. -

[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
Yes I have auto increment field and I have done manual insertions and deletions in it. But insert should return latest id irrespective of what I do to the table. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Gliese 581 g
Please let me know what I have to do to get the id of inserted record. -- 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

[web2py] Re: Insert method in DAL returns incorrect id

2014-10-05 Thread Niphlod
Simple debug to do what web2py does. print the statement print db.mes._insert(me=metext,locale=localeid) execute it in workbench and then do a select last_insert_id(). what does workbench return ? On Sunday, October 5, 2014 10:42:49 PM UTC+2, Gliese 581 g wrote: Please let me

[web2py] Re: Web2py, Apache and Ubuntu 14.04

2014-10-05 Thread Brian M
What exactly happens when you try to access your pages? Are you getting 404 responses or something else? Besides checking the apache error logs take a quick look at the access logs to make sure there isn't a bad rewrite rule causing you headaches - I seem to remember that's how I tasked down

[web2py] Re: HTML multiple select attribute bug in 2.9.11?

2014-10-05 Thread Anthony
When updating web2py, you should always update the JS (and the appadmin controller and view), but only update the CSS if your HTML (and formstyles) are designed to go with it. If your app's layout is based on the scaffolding app, you have to be careful about updating the CSS without changing

[web2py] Re: list:string type issues

2014-10-05 Thread Greg Vaughan
Ahh Anthony what would we do without you... tyvm... (again) a few quick changes to code and works a charm... Cheers Greg On Monday, 6 October 2014 00:48:09 UTC+10, Anthony wrote: Can you show your code? If you want to store a Python structure, you're probably better off using a json field

[web2py] Which DB is best suited for many single entry to one table ?

2014-10-05 Thread arutti
I have a geolocalisation application with 2 tables of interest i.e. db.define_table('device', notnull=True, ...) db.define_table('wp', 'device', type=reference device, notnull=True, ...) The 'device' table may have several hundreds entries, while the 'wp' table holding GPS-coordinates may have

[web2py] Re: Web2py, Apache and Ubuntu 14.04

2014-10-05 Thread Martin Weissenboeck
Solved. Thank you, Brian - you showed me the right way. The error message was ERR_CONNECTION_TIMED_OUT, but the browser shows only a message like page could be loaded (in German). Two things happend: - The new apache default.conf rewrites anything to https - In consequence of the