Is this the sort of thing that the rest_framework serializers are intended to make easier?