aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2011-05-10 12:28:11 +0100
committerTom Christie2011-05-10 12:28:11 +0100
commit144d52c7b330174269db3a3d1c5b27e0765f47df (patch)
tree749cf9ee4c2478460b3bb8d21bff2ba21c293436 /djangorestframework/mixins.py
parent527e4ffdf7f7798dc17757a26d8fd6b155a49bf9 (diff)
downloaddjango-rest-framework-144d52c7b330174269db3a3d1c5b27e0765f47df.tar.bz2
Rename resource to view in few remaining places in renderers (because that's what it now is)
Diffstat (limited to 'djangorestframework/mixins.py')
-rw-r--r--djangorestframework/mixins.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py
index 0a45ef08..ab290fff 100644
--- a/djangorestframework/mixins.py
+++ b/djangorestframework/mixins.py
@@ -268,18 +268,14 @@ class ResponseMixin(object):
response = exc.response
# Serialize the response content
+ # TODO: renderer.media_type isn't the right thing to do here...
if response.has_content_body:
content = renderer(self).render(response.cleaned_content, renderer.media_type)
else:
content = renderer(self).render()
-
- # Munge DELETE Response code to allow us to return content
- # (Do this *after* we've rendered the template so that we include the normal deletion response code in the output)
- if response.status == 204:
- response.status = 200
# Build the HTTP Response
- # TODO: Check if renderer.mimetype is underspecified, or if a content-type header has been set
+ # TODO: renderer.media_type isn't the right thing to do here...
resp = HttpResponse(content, mimetype=renderer.media_type, status=response.status)
for (key, val) in response.headers.items():
resp[key] = val