mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed #31789 -- Added a new headers interface to HttpResponse.
This commit is contained in:
parent
71ae1ab012
commit
bcc2befd0e
47 changed files with 385 additions and 256 deletions
|
@ -119,7 +119,7 @@ And the view::
|
|||
last_book = self.get_queryset().latest('publication_date')
|
||||
response = HttpResponse()
|
||||
# RFC 1123 date format
|
||||
response['Last-Modified'] = last_book.publication_date.strftime('%a, %d %b %Y %H:%M:%S GMT')
|
||||
response.headers['Last-Modified'] = last_book.publication_date.strftime('%a, %d %b %Y %H:%M:%S GMT')
|
||||
return response
|
||||
|
||||
If the view is accessed from a ``GET`` request, an object list is returned in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue