1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #24139 -- Changed HttpResponse.reason_phrase to evaluate based on status_code.

This commit is contained in:
Jon Dufresne
2015-01-12 14:45:09 -08:00
committed by Tim Graham
parent 7f8588d22e
commit d861f95c44
4 changed files with 43 additions and 6 deletions

View File

@@ -163,7 +163,12 @@ Templates
Requests and Responses
^^^^^^^^^^^^^^^^^^^^^^
* ...
* Unless :attr:`HttpResponse.reason_phrase
<django.http.HttpResponse.reason_phrase>` is explicitly set, it now is
determined by the current value of :attr:`HttpResponse.status_code
<django.http.HttpResponse.status_code>`. Modifying the value of
``status_code`` outside of the constructor will also modify the value of
``reason_phrase``.
Tests
^^^^^