# Model [appname/models/far.py]
db.define_table('far_members',
Field('far_id', db.far, requires=IS_IN_DB(db, 'far.id')),
Field('user_id', db.auth_user, default=auth.user_id, writable=False,
requires=IS_IN_DB(db, 'auth_user.id'))
)
db.define_table('far',
Field('cool_title'),
Field('cool_content')
)
# Controller [appname/controllers/default.py]
''' I want to return the user profiles of all `far_members` '''
def far():
return db(db.auth_user.id == db(db.far_members.far_id ==
request.args(0)).select(self.db.far_members.user_id)).select()
# Call (id=1 is not blank)
$ curl -X GET localhost/appname/far/1
Server Error
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.