mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-03 06:54:05 +03:00
A little error in a snipped code in docs
This commit is contained in:
parent
2a0d9b2e3c
commit
5a6f3c26ee
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user