A little error in a snipped code in docs

This commit is contained in:
Daniel Vaca Araujo 2012-10-23 21:23:47 +03:00
parent 2a0d9b2e3c
commit 5a6f3c26ee

View File

@ -314,7 +314,7 @@ The <code>ModelSerializer</code> class lets you automatically create a Serialize
def get_related_field(self, model_field, to_many=False):
queryset = model_field.rel.to._default_manager
if to_many:
return return serializers.ManyRelatedField(queryset=queryset)
return serializers.ManyRelatedField(queryset=queryset)
return serializers.RelatedField(queryset=queryset)
def get_field(self, model_field):