summaryrefslogtreecommitdiff
path: root/django/utils/functional.py
diff options
context:
space:
mode:
authorJohn-Scott Atlakson <john.scott.atlakson@gmail.com>2014-10-19 18:34:35 -0400
committerTim Graham <timograham@gmail.com>2014-10-20 17:59:07 -0400
commitdbf7a3df45e733c1e51d98318fd87de5ffc160a8 (patch)
treef9cbd122f63a7ee221ff3763a8ef64735c3d46c6 /django/utils/functional.py
parent54e695331b07a572e0f37085725d23df69980628 (diff)
Fixed #23688 -- Updated cached_property to preserve docstring of original function
Diffstat (limited to 'django/utils/functional.py')
-rw-r--r--django/utils/functional.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 9d8ecf6856..ceb8b05055 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -51,6 +51,7 @@ class cached_property(object):
"""
def __init__(self, func, name=None):
self.func = func
+ self.__doc__ = getattr(func, '__doc__')
self.name = name or func.__name__
def __get__(self, instance, type=None):