| 679 | |
| 680 | |
| 681 | class HttpResponseNotModified(HttpResponse): |
| 682 | status_code = 304 |
| 683 | |
| 684 | def __init__(self, *args, **kwargs): |
| 685 | super().__init__(*args, **kwargs) |
| 686 | del self["content-type"] |
| 687 | |
| 688 | @HttpResponse.content.setter |
| 689 | def content(self, value): |
| 690 | if value: |
| 691 | raise AttributeError( |
| 692 | "You cannot set content to a 304 (Not Modified) response" |
| 693 | ) |
| 694 | self._container = [] |
| 695 | |
| 696 | |
| 697 | class HttpResponseBadRequest(HttpResponse): |
no outgoing calls