'Set up the select_related data structure so that we only select
certain related models (as opposed to all models, when
self.select_related=True).'

def add_select_related(self, fields):

    if isinstance(self.select_related, bool):
        field_dict = {}
    else:
        field_dict = self.select_related
    for field in fields:
        d = field_dict
        for part in field.split(LOOKUP_SEP):
            d = d.setdefault(part, {})
    self.select_related = field_dict
