mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-03 20:10:10 +03:00
Added convenience constants for common codes
This commit is contained in:
parent
1d404874b3
commit
6a564fa020
|
@ -68,3 +68,13 @@ HTTP_503_SERVICE_UNAVAILABLE = 503
|
|||
HTTP_504_GATEWAY_TIMEOUT = 504
|
||||
HTTP_505_HTTP_VERSION_NOT_SUPPORTED = 505
|
||||
HTTP_511_NETWORK_AUTHENTICATION_REQUIRED = 511
|
||||
|
||||
# Some common responses with convenient shorthand constant names
|
||||
OK = status.HTTP_200_OK
|
||||
CREATED = status.HTTP_201_CREATED
|
||||
UPDATED = status.HTTP_200_OK
|
||||
DELETED = status.HTTP_204_NO_CONTENT
|
||||
BAD_REQUEST = status.HTTP_400_BAD_REQUEST
|
||||
NOT_FOUND = status.HTTP_404_NOT_FOUND
|
||||
DUPLICATE = status.HTTP_409_CONFLICT
|
||||
FORBIDDEN = status.HTTP_403_FORBIDDEN
|
||||
|
|
Loading…
Reference in New Issue
Block a user