Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (18 sloc) 0.737 kb
from django.http import HttpResponse as HttpResponseOld
from Cookie import SimpleCookie
class Response(HttpResponseOld):
_charset = 'utf8'
def __init__(self, content='', status=None, content_type=None):
if not content_type:
content_type = 'text/html; charset=%s' % self._charset
if not isinstance(content, basestring) and\
hasattr(content, '__iter__'):
self._container = content
self._is_string = False
else:
self._container = [content]
self._is_string = True
self.cookies = SimpleCookie()
if status:
self.status_code = status
self._headers = {'content-type': ('Content-Type', content_type)}
Jump to Line
Something went wrong with that request. Please try again.