              )
              raise ImproperlyConfigured(msg % self.__class__.__name__)
  
          return [
              (field.source or field_name, field.label)
              for field_name, field in serializer_class(context=context).fields.items()
              if not getattr(field, 'write_only', False) and not field.source == '*'
          ]
  
      def get_valid_fields(self, queryset, view, context={}):
 
</s>
            (field.source.replace('.', '__') or field_name, field.label)
              )
              raise ImproperlyConfigured(msg % self.__class__.__name__)
  
          return [
            (field.source.replace('.', '__') or field_name, field.label)
              for field_name, field in serializer_class(context=context).fields.items()
              if not getattr(field, 'write_only', False) and not field.source == '*'
          ]
  
      def get_valid_fields(self, queryset, view, context={}):
keep keep keep keep replace keep keep keep keep keep
 Fix dotted source ordering (#5533)

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

* Add test for non-dotted source.
rest_framework/filters.py