def get_latest(self, obj):
    request = self.context.get('request')
    return request.build_absolute_uri(reverse('datasource-channel-values-latest', kwargs={'datasource_pk': obj.datasource_id, 'channel_pk': obj.id}))
def get_latest(self, obj):
    request = self.context.get('request')
    return request.build_absolute_uri(reverse('datasource-channel-values-latest', kwargs={'datasource_pk': obj.datasource_id, 'channel_pk': obj.id}))