tomchristie/django-rest-framework — pull request #1709 by martijnbastiaan (2014-07-27 12:28:27+00:00)
Title: Split remove_invalid_fields() into reusable chunks

Splitting `remove_invalid_fields()` into two methods (`get_valid_fields()` / `remove_invalid_fields()`) allows external code to easily extract orderable fields, without copying the algorithm. We (amcat) use this to allow our table-rendering software to determine which columns it can sort.