mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
Merge 675a9090ab
into 7d64b7016d
This commit is contained in:
commit
5765780474
|
@ -209,6 +209,12 @@ class NotAcceptable(APIException):
|
||||||
super(NotAcceptable, self).__init__(detail, code)
|
super(NotAcceptable, self).__init__(detail, code)
|
||||||
|
|
||||||
|
|
||||||
|
class Conflict(APIException):
|
||||||
|
status_code = status.HTTP_409_CONFLICT
|
||||||
|
default_detail = _('Conflict with the current state of the target resource.')
|
||||||
|
default_code = 'conflict'
|
||||||
|
|
||||||
|
|
||||||
class UnsupportedMediaType(APIException):
|
class UnsupportedMediaType(APIException):
|
||||||
status_code = status.HTTP_415_UNSUPPORTED_MEDIA_TYPE
|
status_code = status.HTTP_415_UNSUPPORTED_MEDIA_TYPE
|
||||||
default_detail = _('Unsupported media type "{media_type}" in request.')
|
default_detail = _('Unsupported media type "{media_type}" in request.')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user