Try taking them out of the table definition. When you are referencing fields 
in the same table, they sometimes need to go outside the table definition.

db.main_post.owner.compute = lambda r: auth.user.id
db.main_post.owner.requires = IS_IN_DB(db, 'auth_user.id')

Or do this;
Field('created_by', db.auth_user, default=auth.user_id)

Reply via email to