tomchristie/django-rest-framework — pull request #1224 by alexjg (2013-11-12 23:40:04+00:00)
Title: Allow aggregate ordering

Currently attempting to order by an aggregate field created with something like `models.Count('fieldname')` fails because the OrderingFilter only allows fieldnames which are in `queryset.model._meta.fields`. This PR adds aggregate fields to the allowed fields.