Added convenience constants for common codes

This commit is contained in:
Chris Foresman 2014-04-22 16:38:13 -05:00
parent 1d404874b3
commit 6a564fa020

View File

@ -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