hello one and all,
i setup in db.py:
db.define_table('blog',
... format = '%(title, blog_date)s')
db.define_table('blog_items',
Field('blog_id', db.blog, requires=IS_IN_DB(db, db.blog.id, '%
(title)s'), writable=False, readable=False),
...
format = '%(item_date)s')
so blog is master to its detail blog_items, in a one to many relation,
which will allow for greater detail and even comments from users.
under the blog_items function, i have a crud.insert(db.blog_items)
method and it displays the edit form and inserts the data almost
perfectly. but it doesn't give the proper value of the blog_id field
to point back to its master record. and upon reflection, how would it?
how do i designation the db.blog_items.blog_id under the blog_items
function so crud.create will insert the record properly and fill the
blog_id field also? thank you in advance. lucas