mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-18 04:20:53 +03:00
Fix indent (#6825)
This commit is contained in:
parent
044252af1c
commit
da1c6d4129
|
@ -966,7 +966,7 @@ The following class is an example of a generic serializer that can handle coerci
|
||||||
into primitive representations.
|
into primitive representations.
|
||||||
"""
|
"""
|
||||||
def to_representation(self, obj):
|
def to_representation(self, obj):
|
||||||
output = {}
|
output = {}
|
||||||
for attribute_name in dir(obj):
|
for attribute_name in dir(obj):
|
||||||
attribute = getattr(obj, attribute_name)
|
attribute = getattr(obj, attribute_name)
|
||||||
if attribute_name.startswith('_'):
|
if attribute_name.startswith('_'):
|
||||||
|
@ -992,7 +992,7 @@ The following class is an example of a generic serializer that can handle coerci
|
||||||
else:
|
else:
|
||||||
# Force anything else to its string representation.
|
# Force anything else to its string representation.
|
||||||
output[attribute_name] = str(attribute)
|
output[attribute_name] = str(attribute)
|
||||||
return output
|
return output
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user