We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 044252a commit da1c6d4Copy full SHA for da1c6d4
docs/api-guide/serializers.md
@@ -966,7 +966,7 @@ The following class is an example of a generic serializer that can handle coerci
966
into primitive representations.
967
"""
968
def to_representation(self, obj):
969
- output = {}
+ output = {}
970
for attribute_name in dir(obj):
971
attribute = getattr(obj, attribute_name)
972
if attribute_name.startswith('_'):
@@ -992,7 +992,7 @@ The following class is an example of a generic serializer that can handle coerci
992
else:
993
# Force anything else to its string representation.
994
output[attribute_name] = str(attribute)
995
- return output
+ return output
996
997
---
998
0 commit comments