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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user