def to_representation(self, instance):
    'Return an ordered dictionary of HAL-style links.'
    request = self.context.get('request')
    ret = OrderedDict()
    for link in self.links:
        name = link[0]
        ret[name] = self.to_link(request, instance, *link[1:])
    return ret
Return an ordered dictionary of HAL-style links.
def to_representation(self, instance):
    
    request = self.context.get('request')
    ret = OrderedDict()
    for link in self.links:
        name = link[0]
        ret[name] = self.to_link(request, instance, *link[1:])
    return ret