toastdriven/django-tastypie — pull request #539 by numan (2012-06-21 00:08:11+00:00)
Title: Selective full dehydration based on request type

I'm using this in a project to give me more flexibility for full dehydration. Basically allows you to control full dehydration between a detail resource and a list of resources.

Exposes 2 new args on ``fields.RelatedField``; ``full_list`` and ``full_detail``. Both of them are non functional unless ``full`` is ``True``. If ``full_list`` is ``False`` and requesting a list of resources, the field will no undergo full dehydration. Ditto with ``full_detail``.

Both args also accept a callback that is passed a bundle and and expected to return ``True`` or ``False``.