Nothing in Django specifically that I'm aware of (although that's not saying much), but you can probably do something pretty slick with the operator library and attrgetter:
It would probably look something like this (untested):
# define a function to pull the nested attribute
# assume this is in myapp/utils.py
def get_item_attr(obj_instance, search_string):
dotted_string = search_string.replace('__', '.')
instance_attr = operator.attrgetter(dotted_string)
instance_attr_value = instance_attr(obj_instance)
return item_attr_value
# later, in a view, maybe...
from myapp.utils import get_item_attr
booking_client_name = get_item_attr(trip, 'booking__client__name')
Obviously this is naive and you'll need to check for failures at various points and raise some exceptions if attributes can't be found/accessed, but I think this may point you in the right direction.
Never tried this on my own so YMMV. Note that you'll incur multiple DB hits using a function like this (for the FK traversals), so be careful if you plan to run such a function several times for a single request.
-James