Adding DELETE to accept body on AutoSchema

According to [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5), even tough some implementations rejects the payload body, it's not forbidden or discouraged, so in my opinion should be allowed.
This commit is contained in:
Gabriel-Arimatea 2017-11-17 10:01:15 -03:00 committed by GitHub
parent 9f66e8badd
commit 659b113b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,7 +293,7 @@ class AutoSchema(ViewInspector):
"""
view = self.view
if method not in ('PUT', 'PATCH', 'POST'):
if method not in ('PUT', 'PATCH', 'POST', 'DELETE'):
return []
if not hasattr(view, 'get_serializer'):