diff --git a/django/utils/functional.py b/django/utils/functional.py
index befe3e9..66667ad 100644
a
|
b
|
def lazy(func, *resultclasses):
|
81 | 81 | cls.__dispatch = {} |
82 | 82 | for resultclass in resultclasses: |
83 | 83 | cls.__dispatch[resultclass] = {} |
84 | | for type_ in reversed(resultclass.mro()): |
85 | | for (k, v) in type_.__dict__.items(): |
86 | | # All __promise__ return the same wrapper method, but they |
87 | | # also do setup, inserting the method into the dispatch |
88 | | # dict. |
89 | | meth = cls.__promise__(resultclass, k, v) |
90 | | if hasattr(cls, k): |
91 | | continue |
92 | | setattr(cls, k, meth) |
| 84 | for k in dir(resultclass): |
| 85 | v = getattr(resultclass, k) |
| 86 | # All __promise__ return the same wrapper method, but they |
| 87 | # also do setup, inserting the method into the dispatch |
| 88 | # dict. |
| 89 | meth = cls.__promise__(resultclass, k, v) |
| 90 | if hasattr(cls, k): |
| 91 | continue |
| 92 | setattr(cls, k, meth) |
93 | 93 | cls._delegate_str = str in resultclasses |
94 | 94 | cls._delegate_unicode = unicode in resultclasses |
95 | 95 | assert not (cls._delegate_str and cls._delegate_unicode), "Cannot call lazy() with both str and unicode return types." |