Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 8d30cdc2672175c77319756b42b12103e1efd350 1 parent fa689ae
@malcolmt malcolmt authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 django/contrib/auth/models.py
View
5 django/contrib/auth/models.py
@@ -281,7 +281,10 @@ def __init__(self):
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__)

0 comments on commit 8d30cdc

Please sign in to comment.
Something went wrong with that request. Please try again.