aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/status.py
diff options
context:
space:
mode:
authorDmitry Mukhin2014-08-20 20:04:48 +0400
committerDmitry Mukhin2014-08-20 20:04:48 +0400
commit3b07d0c9978335e183f369480618b48ff1e1b1ab (patch)
tree041027c50d2965da1be7f93b1a6360e07ad976f9 /rest_framework/status.py
parentc3891b6e00daa7a92cca1c88599e046f72926bb4 (diff)
parent59b47eac14778767a17e56bd8adc0610417f2878 (diff)
downloaddjango-rest-framework-3b07d0c9978335e183f369480618b48ff1e1b1ab.tar.bz2
Merge branch 'master' into set-retry-after
Conflicts: tests/test_throttling.py
Diffstat (limited to 'rest_framework/status.py')
-rw-r--r--rest_framework/status.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rest_framework/status.py b/rest_framework/status.py
index 76435371..90a75508 100644
--- a/rest_framework/status.py
+++ b/rest_framework/status.py
@@ -10,15 +10,19 @@ from __future__ import unicode_literals
def is_informational(code):
return code >= 100 and code <= 199
+
def is_success(code):
return code >= 200 and code <= 299
+
def is_redirect(code):
return code >= 300 and code <= 399
+
def is_client_error(code):
return code >= 400 and code <= 499
+
def is_server_error(code):
return code >= 500 and code <= 599