From 22e016ff6c18a35a450519b94de63033f83e6b4f Mon Sep 17 00:00:00 2001 From: Justin Bronn Date: Thu, 28 Feb 2008 21:24:51 +0000 Subject: gis: Merged revisions 7105-7168 via svnmerge from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/gis@7176 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/decorators.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'django/utils/decorators.py') diff --git a/django/utils/decorators.py b/django/utils/decorators.py index 57ce29fca4..27a080e740 100644 --- a/django/utils/decorators.py +++ b/django/utils/decorators.py @@ -1,6 +1,10 @@ "Functions that help with dynamically creating decorators for views." import types +try: + from functools import wraps +except ImportError: + from django.utils.functional import wraps # Python 2.3, 2.4 fallback. def decorator_from_middleware(middleware_class): """ @@ -53,5 +57,5 @@ def decorator_from_middleware(middleware_class): if result is not None: return result return response - return _wrapped_view + return wraps(view_func)(_wrapped_view) return _decorator_from_middleware -- cgit v1.3