mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-24 02:24:03 +03:00
Added a .parent attribute to the Serializer object for documentation
purposes
This commit is contained in:
parent
54a19105f0
commit
0a57cf9876
|
@ -97,6 +97,11 @@ class Serializer(object):
|
||||||
The maximum depth to serialize to, or `None`.
|
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):
|
def __init__(self, depth=None, stack=[], **kwargs):
|
||||||
if depth is not None:
|
if depth is not None:
|
||||||
self.depth = depth
|
self.depth = depth
|
||||||
|
|
Loading…
Reference in New Issue
Block a user