1
0
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:
Luke Plant
2011-04-23 15:10:51 +00:00
parent 065e6b6153
commit f4c808b7f5
2 changed files with 17 additions and 0 deletions

View File

@@ -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