Based on the django-countriesdocumentation,
>>> person.country
Country(code='NZ')
>>> person.country.name
u'New Zealand'
There must be a way to get unicode for the country name. However, when I try, I get
>>> obj.country
Country(code='AX')
>>> obj.country.name
<django.utils.functional.__proxy__ object at 0x91b81ac>
I exit countries.py and see that the choice is as follows:
('AX', ugettext_lazy('\xc5land Islands'))
Even when used, it print object.country.nameprints the same object. Why doesn't it work?
edit: Sorry, I just put the name object as an example: p
source
share