From 55ee588f6e7aaf31202302783f3e93936ea56702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Wed, 25 Mar 2015 13:27:47 -0400 Subject: [PATCH] Use default reason phrases from HTTP standard. Closes #2763 --- rest_framework/response.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/response.py b/rest_framework/response.py index c21c60a2e..9319e708e 100644 --- a/rest_framework/response.py +++ b/rest_framework/response.py @@ -5,7 +5,7 @@ it is initialized with unrendered data, instead of a pre-rendered string. The appropriate renderer is called during Django's template response rendering. """ from __future__ import unicode_literals -from django.core.handlers.wsgi import STATUS_CODE_TEXT +from django.utils.six.moves.http_client import responses from django.template.response import SimpleTemplateResponse from django.utils import six @@ -77,7 +77,7 @@ class Response(SimpleTemplateResponse): """ # TODO: Deprecate and use a template tag instead # TODO: Status code text for RFC 6585 status codes - return STATUS_CODE_TEXT.get(self.status_code, '') + return responses.get(self.status_code, '') def __getstate__(self): """