I'm building a couple of custom serializer Fields and I need access to the 
whole instance to make a decision on what to return.  If the serializer 
represents a single object, the field can use "self.parent.instance" to get 
the whole thing and everything works great.  When the parent is 
ListSerializer (actual serial is now self.child), there doesn't seem to be 
a way to get the current instance.  In that case, the code execution is 
Serializer.to_representation where instance is passed in but not made 
accessible nor passed down to the field.

Is this a bug or should I be doing something differently?

~CS


-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to