Web2py doesn't force us to define models as classes. It's a pragmatic approach, but lead us to some lack of organization. So, it's common to see functions in models directory concerning common table access, i.e. queries commonly used in your project. The solution would turn these functions into table methods.
It's what we'll show now.
The secret is the
So, just define the
make_member_of() function before your table definitions and enjoy your new table methods.