Closed
Description
It would be nice if the field honoured the Meta.depth
attribute. This would help avoid issues with circular relationships as well as keep payloads lighter.
More documentation on depth can be found here http://www.django-rest-framework.org/api-guide/serializers/#specifying-nested-serialization
By default, the ModelSerializer uses PrimaryKeyFields so maybe that can be the fallback when depth is reached. That, or perhaps specify what field type to fallback.