diff --git a/django/http/__init__.py b/django/http/__init__.py
index 7faa3c8..1dcd395 100644
a
|
b
|
class HttpResponse(object):
|
259 | 259 | |
260 | 260 | status_code = 200 |
261 | 261 | |
262 | | def __init__(self, content='', mimetype=None, status=None, |
263 | | content_type=None): |
| 262 | def __init__(self, content='', mimetype=None, status_code=None, |
| 263 | content_type=None, status=None): |
264 | 264 | from django.conf import settings |
265 | 265 | self._charset = settings.DEFAULT_CHARSET |
266 | 266 | if mimetype: |
… |
… |
class HttpResponse(object):
|
275 | 275 | self._container = [content] |
276 | 276 | self._is_string = True |
277 | 277 | self.cookies = SimpleCookie() |
278 | | if status: |
279 | | self.status_code = status |
| 278 | if status_code and status: |
| 279 | raise ValueError, "You cannot set both status_code and status, note that status is deprecated." |
| 280 | elif status: |
| 281 | from warnings import warn |
| 282 | warn("The status parameter is deprecated, please use status_code instead.", |
| 283 | DeprecationWarning) |
| 284 | status_code = status |
| 285 | elif status_code: |
| 286 | self.status_code = status_code |
280 | 287 | |
281 | 288 | # _headers is a mapping of the lower-case name to the original case of |
282 | 289 | # the header (required for working with legacy systems) and the header |
diff --git a/docs/request_response.txt b/docs/request_response.txt
index 866a697..64e96de 100644
a
|
b
|
it's easy to forget the syntax, so we've included it here.
|
426 | 426 | Methods |
427 | 427 | ------- |
428 | 428 | |
429 | | ``__init__(content='', mimetype=None, status=200, content_type=DEFAULT_CONTENT_TYPE)`` |
| 429 | ``__init__(content='', mimetype=None, status_code=200, content_type=DEFAULT_CONTENT_TYPE)`` |
430 | 430 | Instantiates an ``HttpResponse`` object with the given page content (a |
431 | 431 | string) and MIME type. The ``DEFAULT_CONTENT_TYPE`` is ``'text/html'``. |
432 | 432 | |
… |
… |
Methods
|
434 | 434 | return strings, and those strings will be joined together to form the |
435 | 435 | content of the response. |
436 | 436 | |
437 | | ``status`` is the `HTTP Status code`_ for the response. |
| 437 | ``status_code`` is the `HTTP Status code`_ for the response. |
438 | 438 | |
439 | 439 | **(New in Django development version)** ``content_type`` is an alias for |
440 | 440 | ``mimetype``. Historically, the parameter was only called ``mimetype``, |