Hi,
Web2py is nice for its expression brevity -- but joins still need quite long texting..
I wanted to make it simpler, because "
readability counts" :)
now you can write
build_joins
( ['auth_user', 'auth_membership', 'auth_group', 'auth_permission'] )instead of
[
db.auth_membership.on( db.auth_membership.user_id == db.auth_user.id ),
db.auth_group.on( db.auth_group.id == db.auth_membership.group_id ),
db.auth_permission.on( db.auth_permission.group_id == db.auth_group.id ),
]
Helper uses DB model to figure out the needed fields for join'ing
(if it finds more than one possible field -- would throw an error with explatnation)
Alpha version
https://github.com/dz0/web2py_grand_helpers/blob/master/joins_builder.pySugestions/patches welcome :)