'Return a list of PathInfos containing the path from the current
model to the parent model, or an empty list if parent is not a
parent of the current model.'

def get_path_to_parent(self, parent):

    if (self.model is parent):
        return []
    proxied_model = self.concrete_model
    path = []
    opts = self
    for int_model in self.get_base_chain(parent):
        if (int_model is proxied_model):
            opts = int_model._meta
        else:
            final_field = opts.parents[int_model]
            targets = (final_field.remote_field.get_related_field(),)
            opts = int_model._meta
            path.append(PathInfo(final_field.model._meta, opts, targets, final_field, False, True))
    return path
