Back in Jan.2/10 the default for zero was changed to ''
http://groups.google.com/group/web2py/msg/684a2374e7379861
Consider:
db.define_table('person',Field('name',unique=True), format='%(name)s')
db.define_table('dog',Field('name',unique=True),Field
('owner',db.person), format='%(name)s')
will generate a db.dog.owner dropdown with an empty option that IMO
should not be there since it is not part of the associated IS_IN_DB
requires.
Could you please explain to me why was zero='' made the default?
Denes.
PS: this also applies to IS_IN_SET but not in relation to
table._format e.g.
>>> r=IS_IN_SET((1,2,3))
>>> r.options()
[('', ''), ('1', '1'), ('2', '2'), ('3', '3')]
counter-intuitive.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en.