[web2py] IS_IN_DB() validator only validating on form fields?

2014-03-09 Thread Dan Why
Hi all, Working through the official documentation on Chapter 3, on Image blog example. in models.db.py db.define_table('image', ...) db.define_table('post', ...) ... db.post.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s') in controllers/default.py def show(): image = db.imag

[web2py] Re: IS_IN_DB() validator only validating on form fields?

2014-03-10 Thread Dan Why
depending on the database). Thanks, Dan On Thursday, March 6, 2014 11:41:12 PM UTC-8, Dan Why wrote: > > Hi all, > > Working through the official documentation on Chapter 3, on Image blog > example. > > in models.db.py > db.define_table('image&#

[web2py] Table design question - displaying descriptive text for integer field

2014-03-15 Thread Dan Why
I am building a TODO-list type application while studying web2py. For each task, I would like to set a priority. Having integer values for priority makes it easier to query something like db(db.task.priority > 1).select(). Because there will be only a few of them, I would just create some cons