mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #23688 -- Updated cached_property to preserve docstring of original function
This commit is contained in:
committed by
Tim Graham
parent
54e695331b
commit
dbf7a3df45
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user