Changeset 3144
- Timestamp:
- 06/18/06 21:04:37 (2 years ago)
- Files:
-
- django/trunk/django/http/__init__.py (modified) (1 diff)
- django/trunk/docs/request_response.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/http/__init__.py
r2809 r3144 266 266 self.status_code = 403 267 267 268 class HttpResponseNotAllowed(HttpResponse): 269 def __init__(self, permitted_methods): 270 HttpResponse.__init__(self) 271 self['Allow'] = ', '.join(permitted_methods) 272 self.status_code = 405 273 268 274 class HttpResponseGone(HttpResponse): 269 275 def __init__(self, *args, **kwargs): django/trunk/docs/request_response.txt
r2869 r3144 401 401 Acts just like ``HttpResponse`` but uses a 403 status code. 402 402 403 ``HttpResponseNotAllowed`` 404 Like ``HttpResponse``, but uses a 405 status code. Takes a single, 405 required argument: a list of permitted methods (e.g. ``['GET', 'POST']``). 406 403 407 ``HttpResponseGone`` 404 408 Acts just like ``HttpResponse`` but uses a 410 status code.
