def to_native(self, obj):
     """
     Deserializes the Django model object
     """
     result = SortedDictWithMetadata()
     # Set the self attribute.
     result['self'] = reverse('metric-detail', args=[obj.pk])
     result.update(super(BaseMetricSerializer, self).to_native(obj))
     return result
    def to_native(self, obj):
        """
        Deserializes the Django model object
        """
        if obj is None:
            return super(BaseDatasetSerializer, self).to_native(obj)

        dataset = super(BaseDatasetSerializer, self).to_native(obj)
        result = SortedDictWithMetadata()
        # Set the self attribute.
        result["self"] = reverse("dataset-detail", args=[obj.pk])
        result.update(dataset)
        return result
    def to_native(self, obj):
        """
        Deserializes the Django model object
        """
        if obj is None:
            return super(BaseDatasetSerializer, self).to_native(obj)

        dataset = super(BaseDatasetSerializer, self).to_native(obj)
        result = SortedDictWithMetadata()
        # Set the self attribute.
        result['self'] = reverse('dataset-detail', args=[obj.pk])
        result.update(dataset)
        return result
 def to_native(self, obj):
     result = SortedDictWithMetadata()
     result['self'] = reverse('visualization-detail', args=[obj.pk])
     result.update(super(BaseVisualizationSerializer, self).to_native(obj))
     return result
 def to_native(self, obj):
     result = SortedDictWithMetadata()
     result['self'] = reverse('visualization-detail', args=[obj.pk])
     result.update(super(BaseVisualizationSerializer, self).to_native(obj))
     return result