aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/serializers.py
diff options
context:
space:
mode:
authorMarko Tibold2012-11-15 22:48:22 +0100
committerMarko Tibold2012-11-15 22:48:22 +0100
commit403886b79b9bf5790ee6f07d6ca915cff5b3035a (patch)
tree987db12d60d8dbf56d8f23ff694d7208df6e3184 /rest_framework/serializers.py
parent69a01d71256b9923aac1b8d1b91063068ecfebf7 (diff)
parent3b258d69c92e9d9293f7c5d1690f0ca434e677e3 (diff)
downloaddjango-rest-framework-403886b79b9bf5790ee6f07d6ca915cff5b3035a.tar.bz2
Merge commit '3b258d69c92e9d9293f7c5d1690f0ca434e677e3' into file_and_image_fields
Diffstat (limited to 'rest_framework/serializers.py')
-rw-r--r--rest_framework/serializers.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index 4a13a091..e072564e 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -89,7 +89,7 @@ class BaseSerializer(Field):
pass
_options_class = SerializerOptions
- _dict_class = SortedDictWithMetadata # Set to unsorted dict for backwards compatability with unsorted implementations.
+ _dict_class = SortedDictWithMetadata # Set to unsorted dict for backwards compatibility with unsorted implementations.
def __init__(self, instance=None, data=None, files=None, context=None, **kwargs):
super(BaseSerializer, self).__init__(**kwargs)
@@ -165,7 +165,7 @@ class BaseSerializer(Field):
self.opts.depth = parent.opts.depth - 1
#####
- # Methods to convert or revert from objects <--> primative representations.
+ # Methods to convert or revert from objects <--> primitive representations.
def get_field_key(self, field_name):
"""
@@ -246,7 +246,7 @@ class BaseSerializer(Field):
def to_native(self, obj):
"""
- Serialize objects -> primatives.
+ Serialize objects -> primitives.
"""
if hasattr(obj, '__iter__'):
return [self.convert_object(item) for item in obj]
@@ -254,7 +254,7 @@ class BaseSerializer(Field):
def from_native(self, data, files):
"""
- Deserialize primatives -> objects.
+ Deserialize primitives -> objects.
"""
if hasattr(data, '__iter__') and not isinstance(data, dict):
# TODO: error data when deserializing lists
@@ -336,7 +336,7 @@ class ModelSerializer(Serializer):
"""
Return all the fields that should be serialized for the model.
"""
- # TODO: Modfiy this so that it's called on init, and drop
+ # TODO: Modify this so that it's called on init, and drop
# serialize/obj/data arguments.
#
# We *could* provide a hook for dynamic fields, but