diff options
| author | Tom Christie | 2012-09-21 13:15:31 +0100 | 
|---|---|---|
| committer | Tom Christie | 2012-09-21 13:15:31 +0100 | 
| commit | 3f7371c796a420cc077cf79b210d401c77b77815 (patch) | |
| tree | 14cfb86680b780f601f142bb018164ae10f3d60c /rest_framework/response.py | |
| parent | b4cd699b758c3a891f7c434069ac76084250a57a (diff) | |
| download | django-rest-framework-3f7371c796a420cc077cf79b210d401c77b77815.tar.bz2 | |
Tweak media_type -> accepted_media_type.  Need to document, but marginally less confusing
Diffstat (limited to 'rest_framework/response.py')
| -rw-r--r-- | rest_framework/response.py | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/rest_framework/response.py b/rest_framework/response.py index 0ec87e0a..24c9d595 100644 --- a/rest_framework/response.py +++ b/rest_framework/response.py @@ -21,6 +21,14 @@ class Response(SimpleTemplateResponse):          self.data = data          self.headers = headers and headers[:] or []          self.renderer = renderer + +        # Accepted media type is the portion of the request Accept header +        # that the renderer satisfied.  It could be '*/*', or somthing like +        # 'application/json; indent=4' +        # +        # This is NOT the value that will be returned in the 'Content-Type' +        # header, but we do need to know the value in case there are +        # any specific parameters which affect the rendering process.          self.accepted_media_type = accepted_media_type      @property | 
