mirror of
https://github.com/django/django.git
synced 2025-09-18 00:10:22 +00:00
Fixed #24781 -- Fixed repr() for lazy objects.
This commit is contained in:
parent
2f9c4e2b6f
commit
ffd18732f3
2 changed files with 18 additions and 0 deletions
|
@ -75,6 +75,9 @@ def lazy(func, *resultclasses):
|
|||
(func, self.__args, self.__kw) + resultclasses
|
||||
)
|
||||
|
||||
def __repr__(self):
|
||||
return repr(self.__cast())
|
||||
|
||||
@classmethod
|
||||
def __prepare_class__(cls):
|
||||
for resultclass in resultclasses:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue