mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 16:40:03 +03:00
Properly escape code block in docstring
Fix a problem where the code block in the ModelSerializer create() docstring was improperly escaped which causes sphinx to raise a warning about the un-terminated strong text.
This commit is contained in:
parent
19655edbf7
commit
59d9e87de6
|
@ -905,13 +905,13 @@ class ModelSerializer(Serializer):
|
|||
"""
|
||||
We have a bit of extra checking around this in order to provide
|
||||
descriptive messages when something goes wrong, but this method is
|
||||
essentially just:
|
||||
essentially just::
|
||||
|
||||
return ExampleModel.objects.create(**validated_data)
|
||||
|
||||
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
|
||||
implementation is like so:
|
||||
implementation is like so::
|
||||
|
||||
example_relationship = validated_data.pop('example_relationship')
|
||||
instance = ExampleModel.objects.create(**validated_data)
|
||||
|
|
Loading…
Reference in New Issue
Block a user