MCPcopy
hub / github.com/django/django / HttpResponseNotModified

Class HttpResponseNotModified

django/http/response.py:681–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

679
680
681class 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
697class HttpResponseBadRequest(HttpResponse):

Callers 5

_not_modifiedFunction · 0.90
serveFunction · 0.90
test_not_modifiedMethod · 0.90

Calls

no outgoing calls