aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/status.py
diff options
context:
space:
mode:
authorTom Christie2014-08-19 13:28:07 +0100
committerTom Christie2014-08-19 13:28:07 +0100
commitbf09c32de8f9d528f83e9cb7a2773d1f4c9ab563 (patch)
tree334c85c136fe1dc010f8d7860b9431b3a9d87e56 /rest_framework/status.py
parente385a7b8eb6e538698f28128e43fe8bfaefd4e97 (diff)
downloaddjango-rest-framework-bf09c32de8f9d528f83e9cb7a2773d1f4c9ab563.tar.bz2
Code linting and added runtests.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