내 장고 응용 프로그램에 다음 코드가 있습니다.django : gettext 및 유니 코드로 강제 변환
class Status(object):
def __init__(self, id, desc):
self.id = id
self.desc = desc
def __unicode__(self):
return self.desc
STATUS = Status(0, _(u"Some text"))
내가 어떤 상태를 표시 (또는 유니 코드로 강제)하려고, 내가 얻을 :
는 는TypeError: coercing to Unicode: need string or buffer, __proxy__ found
는
사람이 나를 설명 할 수 있을까요, 내가 무슨 일을하고 있는가?
대단히 감사합니다. – gruszczy