[web2py] how to validate field that depend on each other in the model rather than form

2013-09-16 Thread Hadi Sunyoto
from: http://www.web2py.com/books/default/chapter/29/07/forms-and-validators#Database-validators Validators with dependencies Usually validators are set once for all in models. Occasionally, you need to validate a field and the validator depends on the value of another field. This can be done

[web2py] Query Not Supported: no such column: config.conv_config_value

2013-09-24 Thread Hadi Sunyoto
The error occurs not as an exception, but inside html. model: db.define_table('config', Field('config_name', length=50, required=True, unique=True), Field('convert_option', length=50, requires=IS_IN_SET(CONVERSION, zero=None)), Field('config_value', length=50, required=True),

[web2py] Re: Virtual Fields showing with SQLFORM.grid

2013-10-10 Thread Hadi Sunyoto
Sorry to reply on old post, I tried using what Anthony suggested in stackoverflow, it works ok, but when i try to VIEW or EDIT, the "link" is there next to EDIT (in VIEW) or VIEW (in EDIT) with no header whatsoever. Possible bug ? Version 2.7.2-stable+timestamp.2013.10.07.13.52.24 on Windows -

[web2py] SQLFORM.grid prints output to console

2013-10-16 Thread Hadi Sunyoto
I just check the newest version 2.7.4 in windows, when i display the data grid with 10 columns, it will print each row to console 10 times. Is this correct behavior or someone forget to turn off the "print" statement during debugging? As for 2.7.4, the virtual columns works, and i don't have to

[web2py] self list:reference does not work

2013-11-17 Thread Hadi Sunyoto
the table i have:, common_type and grade is just another table with only 1 field db.define_table('coil_type', Field('common_type_id', 'reference common_type', label='Type'), Field('grade_id', 'reference grade', label='Grade'), Field('alternatives', 'list:reference coil_type'), <-- thi

[web2py] Re: self list:reference does not work

2013-11-18 Thread Hadi Sunyoto
Just found out that this is an old bug: http://code.google.com/p/web2py/issues/detail?id=382&q=list#makechanges and the status is WontFix, but there is a solution inside the address above On Monday, November 18, 2013 2:54:14 PM UTC+7, Hadi Sunyoto wrote: > > the table i have:, commo