              )
              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 (
 
</s> remove             if not getattr(field, 'write_only', False) and not field.source == '*'
 </s> add             if (
                not getattr(field, 'write_only', False) and
                not field.source == '*' and
                field.source not in model_property_names
            )
        model_class = queryset.model
        model_property_names = [
            # 'pk' is a property added in Django's Model class, however it is valid for ordering.
            attr for attr in dir(model_class) if isinstance(getattr(model_class, attr), property) and attr != 'pk'
        ]

              )
              raise ImproperlyConfigured(msg % self.__class__.__name__)
  
        model_class = queryset.model
        model_property_names = [
            # 'pk' is a property added in Django's Model class, however it is valid for ordering.
            attr for attr in dir(model_class) if isinstance(getattr(model_class, attr), property) and attr != 'pk'
        ]

          return [
              (field.source.replace('.', '__') or field_name, field.label)
              for field_name, field in serializer_class(context=context).fields.items()
              if (
keep keep add keep keep keep keep
 Ordering filter bug with model property serializer field (#7609)

* Add failing tests for ordering filter with model property

* Fix get_default_valid_fields of OrderingFilter

* Filter model properties in get_default_valid_fields of OrderingFilter 
rest_framework/filters.py