Ticket #6349: HttpResponseUnauthorized.patch

File HttpResponseUnauthorized.patch, 929 bytes (added by moep, 17 years ago)
  • django/http/__init__.py

     
    385385class HttpResponseBadRequest(HttpResponse):
    386386    status_code = 400
    387387
     388class HttpResponseUnauthorized(HttpResponse):
     389    status_code = 401
     390
    388391class HttpResponseNotFound(HttpResponse):
    389392    status_code = 404
    390393
  • docs/request_response.txt

     
    470470    **New in Django development version.**
    471471    Acts just like ``HttpResponse`` but uses a 400 status code.
    472472
     473``HttpResponseUnauthorized``
     474    Acts just like ``HttpResponse`` but uses a 401 status code.
     475
    473476``HttpResponseNotFound``
    474477    Acts just like ``HttpResponse`` but uses a 404 status code.
    475478
Back to Top