summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/utils/decorators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/decorators.py b/django/utils/decorators.py
index 4ccf1d69df..fbcf4edf13 100644
--- a/django/utils/decorators.py
+++ b/django/utils/decorators.py
@@ -22,7 +22,7 @@ def method_decorator(decorator):
def _wrapper(self, *args, **kwargs):
@decorator
def bound_func(*args2, **kwargs2):
- return func(self, *args2, **kwargs2)
+ return func.__get__(self, type(self))(*args2, **kwargs2)
# bound_func has the signature that 'decorator' expects i.e. no
# 'self' argument, but it is a closure over self so it can call
# 'func' correctly.