# primitive types can be passed through unmodified.
# Primitive types can be passed through unmodified.
output[attribute_name] = attribute
output[attribute_name] = attribute
elif isinstance(attribute, list):
elif isinstance(attribute, list):
# Recursivly deal with items in lists.
# Recursivly deal with items in lists.
...
@@ -446,7 +446,7 @@ We now use the following:
...
@@ -446,7 +446,7 @@ We now use the following:
#### The `required`, `allow_none`, `allow_blank` and `default` arguments.
#### The `required`, `allow_none`, `allow_blank` and `default` arguments.
REST framework now has more explict and clear control over validating empty values for fields.
REST framework now has more explicit and clear control over validating empty values for fields.
Previously the meaning of the `required=False` keyword argument was underspecified. In practice its use meant that a field could either be not included in the input, or it could be included, but be `None`.
Previously the meaning of the `required=False` keyword argument was underspecified. In practice its use meant that a field could either be not included in the input, or it could be included, but be `None`.
...
@@ -522,7 +522,7 @@ However this code *would not be valid* in `2.4.3`:
...
@@ -522,7 +522,7 @@ However this code *would not be valid* in `2.4.3`:
# ...
# ...
The queryset argument is now always required for writable relational fields.
The queryset argument is now always required for writable relational fields.
This removes some magic and makes it easier and more obvious to move between implict `ModelSerializer` classes and explicit `Serializer` classes.
This removes some magic and makes it easier and more obvious to move between implicit `ModelSerializer` classes and explicit `Serializer` classes.
class AccountSerializer(serializers.ModelSerializer):
class AccountSerializer(serializers.ModelSerializer):