diff --git a/rest_framework/status.py b/rest_framework/status.py index c016b63c6..a99dbe9b7 100644 --- a/rest_framework/status.py +++ b/rest_framework/status.py @@ -79,3 +79,13 @@ HTTP_504_GATEWAY_TIMEOUT = 504 HTTP_505_HTTP_VERSION_NOT_SUPPORTED = 505 HTTP_507_INSUFFICIENT_STORAGE = 507 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