          fields = '__all__'
  
  
  class DjangoFilterOrderingModel(models.Model):
      date = models.DateField()
      text = models.CharField(max_length=10)
  
 
</s> remove             (field.source or field_name, field.label)
 </s> add             (field.source.replace('.', '__') or field_name, field.label)
class OrderingDottedRelatedSerializer(serializers.ModelSerializer):
    related_text = serializers.CharField(source='related_object.text')
    related_title = serializers.CharField(source='related_object.title')

    class Meta:
        model = OrderingFilterRelatedModel
        fields = (
            'related_text',
            'related_title',
            'index',
        )


          fields = '__all__'
  
  
class OrderingDottedRelatedSerializer(serializers.ModelSerializer):
    related_text = serializers.CharField(source='related_object.text')
    related_title = serializers.CharField(source='related_object.title')

    class Meta:
        model = OrderingFilterRelatedModel
        fields = (
            'related_text',
            'related_title',
            'index',
        )


  class DjangoFilterOrderingModel(models.Model):
      date = models.DateField()
      text = models.CharField(max_length=10)
  
keep keep add keep keep keep keep
 Fix dotted source ordering (#5533)

* replaced '.' for '__' in dotted ordering sources

* Add test for non-dotted source. 
tests/test_filters.py