  
          # Ensure uniqueness.
          filter_kwargs = {field_name: value}
          queryset = self.queryset.filter(**filter_kwargs)
          if instance:
              queryset = queryset.exclude(pk=instance.pk)
          if queryset.exists():
              raise ValidationError(self.message)
  
      def __repr__(self):
          return '<%s(queryset=%s)>' % (
 
</s> remove         filter_kwargs = {field_name: value}
 </s> add         filter_kwargs = {self.field_name: value} </s> remove         if instance:
            queryset = queryset.exclude(pk=instance.pk)
 </s> add         if self.instance is not None:
            queryset = queryset.exclude(pk=self.instance.pk) </s> remove             (field_name, value[field_name]) for field_name in self.fields
 </s> add             (field_name, attrs[field_name]) for field_name in self.fields </s> remove         instance = getattr(field.parent, 'instance', None)
 </s> add         self.instance = getattr(serializer_field.parent, 'instance', None)
        if self.instance is not None:
            queryset = queryset.exclude(pk=self.instance.pk)
  
          # Ensure uniqueness.
          filter_kwargs = {field_name: value}
          queryset = self.queryset.filter(**filter_kwargs)
        if self.instance is not None:
            queryset = queryset.exclude(pk=self.instance.pk)
        if self.instance is not None:
            queryset = queryset.exclude(pk=self.instance.pk)
          if queryset.exists():
              raise ValidationError(self.message)
  
      def __repr__(self):
          return '<%s(queryset=%s)>' % (
keep keep keep keep replace replace keep keep keep keep keep
 First pass at unique_for_date, unique_for_month, unique_for_year 
rest_framework/validators.py