Last Updated: February 25, 2016
· thurloat

Django i18n and ugettext_lazy

=> str(ugettext_lazy('')) 
'<django.utils.functional.__proxy__ object at 0x0>'

Ensure you're always working with unicode. For me, it turned out that a certain Django mail backend called str() on the subject line of an email who was using i18n strings.

I had to manually coerce the values using unicode(ugettext_lazy('')) in order for users to stop receiving emails with subject lines referring to memory addresses.