def __init__(self, *args, **kwargs):
"""
Initialize the class.
Parameters:
*args, **kwsrgs: Any arguments to be passed to ReferenceField.
Keyword Arguments:
id_check: Set False to disable id check. By default, this value is
True
autosave: Set True to save/update the referenced document when
to_python is called.
max_depth: Set natural value to set depath limit for
loop-reference. By default this value is set to 3.
"""
self.id_check = kwargs.pop("id_check", True)
self.autosave = kwargs.pop("autosave", False)
self.max_depth = kwargs.pop("max_depth", 3)
super(FollowReferenceField, self).__init__(*args, **kwargs)
评论列表
文章目录