mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #15688 - Generic views should provide a HEAD implementation
Thanks to j4mie for the report and patch! git-svn-id: http://code.djangoproject.com/svn/django/trunk@16095 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -44,6 +44,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
|
||||
|
||||
Reference in New Issue
Block a user