Hi! I put your code to good use in my project and have two minor 
suggestions:

Make the signature of 

def get_related_serializer(self, key)

like this:

def get_related_serializer(self, key, obj): 


because the related serializer could also depend on obj (does for me).

Secondly: the naming of serialize_val(self, key) is a bit unfortunate, I was 
confused by it multiple times. Maybe it should be made clear that this is 
used for serialize_model (and not something arbitrary). Also, key should 
maybe be named fname to be consistent (it is not the final serialized key, 
after all).

Lastly:

if any([obj is elem for elem in self.stack]):

 
Didn't you just redefine the 'in' operator?

if obj in self.stack:


 
Thanks for your work!

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/lP6lX-xnzN8J.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to