mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	Fixed a failing test in special_headers, and performed a bit of cleanup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16105 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -44,8 +44,6 @@ 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 | ||||
| @@ -79,6 +77,9 @@ class View(object): | ||||
|         ) | ||||
|         return http.HttpResponseNotAllowed(allowed_methods) | ||||
|  | ||||
|     def head(self, *args, **kwargs): | ||||
|         return self.get(*args, **kwargs) | ||||
|  | ||||
|  | ||||
| class TemplateResponseMixin(object): | ||||
|     """ | ||||
|   | ||||
| @@ -10,5 +10,5 @@ def xview(request): | ||||
|     return HttpResponse() | ||||
|  | ||||
| class XViewClass(View): | ||||
|     def get(request): | ||||
|     def get(self, request): | ||||
|         return HttpResponse() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user