Have options example in documenting-your-api.md to return a Response (#7639)

It was returning data which is not correct. Closes #7638.

Co-authored-by: Jean-Pierre Merx <jean-pierre.merx@aictivate.com>
This commit is contained in:
Jean-Pierre Merx 2021-03-08 13:08:26 +01:00 committed by GitHub
parent ef112f5017
commit 234527959d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,7 +202,7 @@ You can modify the response behavior to `OPTIONS` requests by overriding the `op
meta = self.metadata_class()
data = meta.determine_metadata(request, self)
data.pop('description')
return data
return Response(data=data, status=status.HTTP_200_OK)
See [the Metadata docs][metadata-docs] for more details.