mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
Escape docstring markup that causes sphinx error.
This commit is contained in:
parent
2854679f56
commit
fd02cce673
|
@ -885,14 +885,14 @@ class ModelSerializer(Serializer):
|
||||||
descriptive messages when something goes wrong, but this method is
|
descriptive messages when something goes wrong, but this method is
|
||||||
essentially just:
|
essentially just:
|
||||||
|
|
||||||
return ExampleModel.objects.create(**validated_data)
|
return ExampleModel.objects.create(\*\*validated_data)
|
||||||
|
|
||||||
If there are many to many fields present on the instance then they
|
If there are many to many fields present on the instance then they
|
||||||
cannot be set until the model is instantiated, in which case the
|
cannot be set until the model is instantiated, in which case the
|
||||||
implementation is like so:
|
implementation is like so:
|
||||||
|
|
||||||
example_relationship = validated_data.pop('example_relationship')
|
example_relationship = validated_data.pop('example_relationship')
|
||||||
instance = ExampleModel.objects.create(**validated_data)
|
instance = ExampleModel.objects.create(\*\*validated_data)
|
||||||
instance.example_relationship = example_relationship
|
instance.example_relationship = example_relationship
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user