Code

Ticket #20017: jython_lazy_fix.diff

File jython_lazy_fix.diff, 519 bytes (added by andreas@…, 13 months ago)
Line 
1diff --git a/django/utils/functional.py b/django/utils/functional.py
2index d740acf..647668d 100644
3--- a/django/utils/functional.py
4+++ b/django/utils/functional.py
5@@ -108,6 +108,7 @@ def lazy(func, *resultclasses):
6                     cls.__str__ = cls.__text_cast
7                 else:
8                     cls.__unicode__ = cls.__text_cast
9+                    cls.__str__ = cls.__text_cast
10             elif cls._delegate_bytes:
11                 if six.PY3:
12                     cls.__bytes__ = cls.__bytes_cast