@classmethod
def prepare(cls, ctx, related):
    """
        Called by QuerySetResource to add necessary select_related-s
        calls to the QuerySet.
        """
    for field in cls.fields:
        try:
            prepare = field.prepare
        except AttributeError:
            pass
        else:
            prepare(ctx, related)
    return related
