I have the flowing two field definitions:
Field('code_1', default='', label=T("Code 1"),
requires=[IS_EMPTY_OR(IS_NOT_IN_DB(db,
'product.code_1',error_message=T('Code 1 already in
use'),ignore_common_filters=False)),IS_LENGTH(maxsize=15)]),
Field('code_2', default='',label=T("Code 2")),
However
how come i have to test an empty string field within a try|except block
like this:
try:
b = q.create_lecture_foldername!=None
except:
b = False
if b:
something
instead of the more straight forward:
if (q.create_lecture_foldername!=None):
something
because if i try the previous simp
I am using the Pengoworks auto complete plugin.
In my model file I have:
db.address.city.widget=lambda
self,value:INPUT(_type='text',_id='city',_class='ac_input',_name='city_name',requires=self.requires)
In web2py_ajax.html:
jQuery('#city').autocomplete('/cms/handlers/cityAC',{maxItemsToShow:
3 matches
Mail list logo