aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/serializers.md
diff options
context:
space:
mode:
authorPhilip Douglas2013-08-16 07:15:09 -0700
committerPhilip Douglas2013-08-16 07:15:09 -0700
commitef7ce344865938bea285a408a7cc415a7b90a83c (patch)
tree1bfa78c86e422f81cf836319d91c626c763d5b24 /docs/api-guide/serializers.md
parentc058ab36b13a6979c57760d9af2eb21ec3165e7d (diff)
parentc1ccd8b5b5aef1bd209862f9431c9c03e25ae755 (diff)
downloaddjango-rest-framework-ef7ce344865938bea285a408a7cc415a7b90a83c.tar.bz2
Merge pull request #3 from tomchristie/master
Update to latest
Diffstat (limited to 'docs/api-guide/serializers.md')
-rw-r--r--docs/api-guide/serializers.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md
index a1f0853e..bbc8d019 100644
--- a/docs/api-guide/serializers.md
+++ b/docs/api-guide/serializers.md
@@ -403,7 +403,7 @@ You can change the field that is used for object lookups by setting the `lookup_
Not that the `lookup_field` will be used as the default on *all* hyperlinked fields, including both the URL identity, and any hyperlinked relationships.
-For more specfic requirements such as specifying a different lookup for each field, you'll want to set the fields on the serializer explicitly. For example:
+For more specific requirements such as specifying a different lookup for each field, you'll want to set the fields on the serializer explicitly. For example:
class AccountSerializer(serializers.HyperlinkedModelSerializer):
url = serializers.HyperlinkedIdentityField(
@@ -429,7 +429,7 @@ You can create customized subclasses of `ModelSerializer` or `HyperlinkedModelSe
Doing so should be considered advanced usage, and will only be needed if you have some particular serializer requirements that you often need to repeat.
-## Dynamically modifiying fields
+## Dynamically modifying fields
Once a serializer has been initialized, the dictionary of fields that are set on the serializer may be accessed using the `.fields` attribute. Accessing and modifying this attribute allows you to dynamically modify the serializer.
@@ -449,7 +449,7 @@ For example, if you wanted to be able to set which fields should be used by a se
# Don't pass the 'fields' arg up to the superclass
fields = kwargs.pop('fields', None)
- # Instatiate the superclass normally
+ # Instantiate the superclass normally
super(DynamicFieldsModelSerializer, self).__init__(*args, **kwargs)
if fields: