class documentation
class Response(SimpleTemplateResponse): (source)
An HttpResponse that allows its data to be rendered into arbitrary media types.
Method | __getstate__ |
Remove attributes from the response that shouldn't be cached. |
Method | __init__ |
Alters the init arguments slightly. For example, drop 'template_name', and instead use 'data'. |
Instance Variable | content |
Undocumented |
Instance Variable | data |
Undocumented |
Instance Variable | exception |
Undocumented |
Instance Variable | template |
Undocumented |
Property | rendered |
Undocumented |
Property | status |
Returns reason text corresponding to our HTTP response status code. Provided for convenience. |
def __init__(self, data=None, status=None, template_name=None, headers=None, exception=False, content_type=None):
(source)
¶
Alters the init arguments slightly. For example, drop 'template_name', and instead use 'data'. Setting 'renderer' and 'media_type' will typically be deferred, For example being set automatically by the `APIView`.