aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlen Mujezinovic2012-03-01 12:51:23 +0000
committerAlen Mujezinovic2012-03-01 12:51:23 +0000
commit0a57cf98766ebbf22900024608faefbca3bdde6b (patch)
treec7c90fe5c0311e52ed36a8d7c71f9f89fc883058
parent54a19105f051113085efe9f87783acb77127c1d1 (diff)
downloaddjango-rest-framework-0a57cf98766ebbf22900024608faefbca3bdde6b.tar.bz2
Added a .parent attribute to the Serializer object for documentation
purposes
-rw-r--r--djangorestframework/serializer.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/djangorestframework/serializer.py b/djangorestframework/serializer.py
index e2d860a2..f30667f1 100644
--- a/djangorestframework/serializer.py
+++ b/djangorestframework/serializer.py
@@ -96,6 +96,11 @@ class Serializer(object):
"""
The maximum depth to serialize to, or `None`.
"""
+
+ parent = None
+ """
+ A reference to the root serializer when descending down into fields.
+ """
def __init__(self, depth=None, stack=[], **kwargs):
if depth is not None: