Commit 593b3c32 authored by Tim Graham's avatar Tim Graham
Browse files

Merge pull request #2756 from tubaman/return_unicode

Unicode method on model should return unicode
parents 4445d36d f39b8867
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ For example::
        last_name = models.CharField(max_length=50)

        def __unicode__(self):
            return '%s %s' % (self.first_name, self.last_name)
            return u'%s %s' % (self.first_name, self.last_name)

If you define a ``__unicode__()`` method on your model and not a
:meth:`~Model.__str__()` method, Django will automatically provide you with a