Ticket #3362: httpresponsenocontent.3.patch
File httpresponsenocontent.3.patch, 1.2 KB (added by , 18 years ago) |
---|
-
django/http/__init__.py
253 253 raise Exception, "This %s instance cannot tell its position" % self.__class__ 254 254 return sum([len(chunk) for chunk in self._container]) 255 255 256 class HttpResponseNoContent(HttpResponse): 257 def __init__(self): 258 HttpResponse.__init__(self) 259 self.status_code = 204 260 256 261 class HttpResponseRedirect(HttpResponse): 257 262 def __init__(self, redirect_to): 258 263 HttpResponse.__init__(self) -
docs/request_response.txt
417 417 The constructor doesn't take any arguments. Use this to designate that a 418 418 page hasn't been modified since the user's last request. 419 419 420 ``HttpResponseNoContent`` 421 Indicate that request has been processed successfully but that no response 422 content is required. The constructor doesn't take any arguments. 423 420 424 ``HttpResponseNotFound`` 421 425 Acts just like ``HttpResponse`` but uses a 404 status code. 422 426