mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +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:
parent
fa689ae9c6
commit
8d30cdc267
@ -281,7 +281,10 @@ class AnonymousUser(object):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return _('AnonymousUser')
|
return 'AnonymousUser'
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return unicode(self).encode('utf-8')
|
||||||
|
|
||||||
def __eq__(self, other):
|
def __eq__(self, other):
|
||||||
return isinstance(other, self.__class__)
|
return isinstance(other, self.__class__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user