[Django]-What is a django.utils.functional.__proxy__ object and what it helps with?

32👍

It is a translation string – a string that has been marked as translated but whose actual translation result isn’t determined until the object is used in a string. See Django documentation: https://docs.djangoproject.com/en/dev/ref/unicode/#translated-strings.

Calling unicode(object) will generate a Unicode string. Also, if you call __dict__ of the object, you can find its data under _proxy____args.

👤iceui2

Leave a comment