Serializers should accept source='*' argument. Fixes #604.

(Test also incoming)
This commit is contained in:
Tom Christie 2013-01-26 20:54:03 +00:00
parent a2dcf5e878
commit b41f258ee5

View File

@ -300,6 +300,9 @@ class BaseSerializer(Field):
Override default so that we can apply ModelSerializer as a nested
field to relationships.
"""
if self.source == '*':
return self.to_native(obj)
try:
if self.source:
for component in self.source.split('.'):