summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-05-13 11:11:27 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-05-13 11:11:27 +0000
commitb29b0f8cac486f6733c2b768feccd83b62a13a9c (patch)
treecc00d4bcb6548e2d7940b372897ec97c40d02079
parent8e7d2d2e6824dc69fcfef8dc6467f6d874ddc9ee (diff)
Corrected 'name' of functions wrapped with method_decorator
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/utils/decorators.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/utils/decorators.py b/django/utils/decorators.py
index 2a208ed6e1..ba276937f8 100644
--- a/django/utils/decorators.py
+++ b/django/utils/decorators.py
@@ -22,7 +22,7 @@ def method_decorator(decorator):
return wraps(func)(_wrapper)
update_wrapper(_dec, decorator)
# Change the name to aid debugging.
- _dec.__name__ = 'method_dec(%s)' % decorator.__name__
+ _dec.__name__ = 'method_decorator(%s)' % decorator.__name__
return _dec
@@ -50,6 +50,7 @@ def decorator_from_middleware(middleware_class):
"""
return make_middleware_decorator(middleware_class)()
+
def available_attrs(fn):
"""
Return the list of functools-wrappable attributes on a callable.
@@ -57,6 +58,7 @@ def available_attrs(fn):
"""
return tuple(a for a in WRAPPER_ASSIGNMENTS if hasattr(fn, a))
+
def make_middleware_decorator(middleware_class):
def _make_decorator(*m_args, **m_kwargs):
middleware = middleware_class(*m_args, **m_kwargs)