aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/response.py
AgeCommit message (Collapse)Author
2015-01-23More sensible response caching.Tom Christie
2014-10-08Reverted 59d0a0387d907260ef8f91bbbca618831abd75a3 and fixed the testsXavier Ordoquy
2014-08-19Drop six from compat. 1.4.2 is now the lowest supported version.Tom Christie
2014-08-19Code linting and added runtests.pyTom Christie
2014-08-01Leave status responsibility to parent classAnler Hp
Django's `HttpResponse` class checks for the `status` param when it's initialized, if it's `None` it uses the class attribute `status_code` and thanks to that we can do things like: ``` class BadRequest(HttpResponse): status_code = 400 ``` Now, that doesn't work when inheriting from rest-framework's `Response`: ``` class BadRequest(rest_framework.response.Response): status_code = 400 # Bad, it's always ignored ``` Because a default status of `200` is being specified in `rest_framework.response.Response`. I think is more Django-friendly to just leave that status default value to `None` and leave the responsibility of choosing its value to the parent class: `HttpResponse`.
2014-07-29Better fix for the Django 1.3 compatXavier Ordoquy
2014-07-29Fixed the Django 1.3 compatXavier Ordoquy
2014-07-29Fixed the cache issue with Django 1.7 rc*Xavier Ordoquy
2013-12-03Remove Content-Type header from empty responses. Fixes #1196Tom Christie
2013-06-02fix doc typoMenghan
2013-05-28Fixed typosPascal Borreli
2013-05-20content type may be set explicitly on the responseTom Christie
2013-05-20Fix charset issuesTom Christie
2013-05-18Added proper charset supportTom Christie
2013-05-18charset param gets now appended to response's Content-Type. Closes #807Karol Majta
2013-04-25Cleanup docstringsTom Christie
2013-02-04Cleanup importsTom Christie
Mostly adding `from __future__ import unicode_literals` everywhere.
2013-01-03Move the various compat things to the compat module.Xavier Ordoquy
2012-11-24Every (base) test should now pass with python3.Xavier Ordoquy
2012-11-14Merge pull request #407 from ludwigkraatz/location_headerTom Christie
Location header when Creating a Resource with HyperlinkedIdentityField
2012-11-14fixed some typosStephan Groß
2012-11-13changed buggy response + code ploishingLudwig Kraatz
reponse didnt handle any headers at all. Accepts now a dict of headers and sets those properly
2012-11-06Support for HTML error templates. Fixes #319.Tom Christie
2012-11-04Remove attributes that are not needed when cachingJacob Magnusson
the Response object. This fixes #346
2012-10-10Make sure JSON output in Browseable API is nicely indentedTom Christie
2012-10-05Docs for template responsesTom Christie
2012-10-05HTMLTemplateRenderer workingTom Christie
2012-10-05Accepted media type uses most specific of client/renderer media types.Tom Christie
2012-09-30Docs tweakingTom Christie
2012-09-21Tweak media_type -> accepted_media_type. Need to document, but marginally ↵Tom Christie
less confusing
2012-09-21Tweak media_type -> accepted_media_type. Need to document, but marginally ↵Tom Christie
less confusing
2012-09-21Tweak media_type -> accepted_media_type. Need to document, but marginally ↵Tom Christie
less confusing
2012-09-20Clean up bits of templates etcTom Christie
2012-09-20Change package name: djangorestframework -> rest_frameworkTom Christie