summaryrefslogtreecommitdiff
path: root/django/http/__init__.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2006-06-19 15:23:57 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2006-06-19 15:23:57 +0000
commitadf4b9311d5d64a2bdd58da50271c121ea22e397 (patch)
treea69b3b023595cf1ce67a14c4c1ecd3290d94088e /django/http/__init__.py
parente976ed1f7910fad03704f88853c5c5b36cbab134 (diff)
downloaddjango-attic/multi-auth.tar.gz
multi-auth: Merged to [3151]archive/attic/multi-authattic/multi-auth
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@3152 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/http/__init__.py')
-rw-r--r--django/http/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py
index bb03ab8ea5..178510c94c 100644
--- a/django/http/__init__.py
+++ b/django/http/__init__.py
@@ -265,6 +265,12 @@ class HttpResponseForbidden(HttpResponse):
HttpResponse.__init__(self, *args, **kwargs)
self.status_code = 403
+class HttpResponseNotAllowed(HttpResponse):
+ def __init__(self, permitted_methods):
+ HttpResponse.__init__(self)
+ self['Allow'] = ', '.join(permitted_methods)
+ self.status_code = 405
+
class HttpResponseGone(HttpResponse):
def __init__(self, *args, **kwargs):
HttpResponse.__init__(self, *args, **kwargs)