1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

unicode: Fixed #4472 -- Must return unicode objects from __unicode__ methods.

Lazy translation proxies are not an acceptable substitute.


git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5421 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-06-04 07:48:51 +00:00
parent fa689ae9c6
commit 8d30cdc267

View File

@ -281,7 +281,10 @@ class AnonymousUser(object):
pass
def __unicode__(self):
return _('AnonymousUser')
return 'AnonymousUser'
def __str__(self):
return unicode(self).encode('utf-8')
def __eq__(self, other):
return isinstance(other, self.__class__)