Hi
After posting this post :
http://groups.google.com/group/web2py/browse_thread/thread/d563b39812111a8d
and I'm always finding somethings like this which causes problems
here's another example
import datetime
db = DAL("mysql://root:t...@localhost/cockbook")
db.define_table('category', Field('name'))
db.define_table('recipe', Field('title'), Field('category',
db.category), Field('description', length=256),
Field('instructions', 'text'), Field('date',
'datetime', default=datetime.datetime.today()))
db.category.name.requires = [IS_NOT_EMPTY(), IS_NOT_IN_DB(db,
db.category.name)]
db.recipe.title.requires = IS_NOT_EMPTY()
db.recipe.description.requires = IS_NOT_EMPTY()
db.recipe.category.require = IS_IN_DB(db, db.category.id, '%(title)s')
see the (db.recipe.category.require) it is not (requires)
it was accepted though !!!!!! and I got mad trying to figure out why
table recipe accepts a category that is not in the category table !!!
(require) was refused though iwhen being put inside the table
definition
so why not being more strict in checking syntax ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---