 <p>This is not possible using <a href="http://www.django-rest-framework.org/api-guide/filtering/#orderingfilter">the default <code>OrderingFilter</code></a>, because the ordering is implemented <em>on the database side</em>. This is for efficiency reasons, as manually sorting the results can be <em>incredibly</em> slow and means breaking from a standard <code>QuerySet</code>. By keeping everything as a <code>QuerySet</code>, you benefit from the built-in filtering provided by Django REST framework (which generally expects a <code>QuerySet</code>) and the built-in pagination (which can be slow without one).</p> <p>Now, you have two options in these cases: figure out how to retrieve your value on the database side, or try to minimize the performance hit you are going to have to take. Since the latter option is very implementation-specific, I'm going to skip it for now.</p> <p>In this case, you can use <a href="https://docs.djangoproject.com/en/1.8/ref/models/querysets/#id7">the <code>Count</code> function</a> provided by Django to do the count on the database side. This is provided as part of <a href="https://docs.djangoproject.com/en/1.8/topics/db/aggregation/">the aggregation API</a> and works like <a href="https://msdn.microsoft.com/en-us/library/ms175997.aspx">the SQL <code>COUNT</code> function</a>. You can do the equivalent <code>Count</code> call by modifying your <code>queryset</code> on the view to be</p> <pre><code>queryset = Topic.objects.annotate(vote_count=Count('topicvote_set')) </code></pre> <p>Replacing <code>topicvote_set</code> with <a href="https://docs.djangoproject.com/en/1.8/ref/models/fields/#django.db.models.ForeignKey.related_name">your <code>related_name</code> for the field</a> (you have one set, right?). This will allow you to order the results based on the number of votes, and even do filtering (if you want to) because it is available within the query itself.</p> <p>This would require making a slight change to your serializer, so it pulls from the new <code>vote_count</code> property available on objects.</p> <pre><code>class TopicSerializer(serializers.ModelSerializer): vote_count = serializers.IntegerField(read_only=True) class Meta: model = Topic </code></pre> <p>This will override your existing <code>vote_count</code> method, so you may want to rename the variable used when annotating (if you can't replace the old method).</p> <hr> <p>Also, you can pass a method name as the <code>source</code> of a Django REST framework field and it will automatically call it. So technically your current serializer could just be</p> <pre><code>class TopicSerializer(serializers.ModelSerializer): vote_count = serializers.IntegerField(read_only=True) class Meta: model = Topic </code></pre> <p>And it would work <em>exactly</em> like it currently does. Note that <code>read_only</code> is required in this case because a method is not the same as a property, so the value cannot be set.</p>