1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Prevented the generic views from automatically creating a HEAD method when there is no GET. Reverts r16105, refs #17449.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Aymeric Augustin
2012-02-18 09:50:03 +00:00
parent 8d221e554c
commit 52b06e29c7
2 changed files with 16 additions and 4 deletions

View File

@@ -43,6 +43,8 @@ class View(object):
def view(request, *args, **kwargs):
self = cls(**initkwargs)
if hasattr(self, 'get') and not hasattr(self, 'head'):
self.head = self.get
return self.dispatch(request, *args, **kwargs)
# take name and docstring from class
@@ -76,9 +78,6 @@ class View(object):
)
return http.HttpResponseNotAllowed(allowed_methods)
def head(self, *args, **kwargs):
return self.get(*args, **kwargs)
class TemplateResponseMixin(object):
"""