From f39b8867a1b30d6e9f1dff2a544c89354dd55b0d Mon Sep 17 00:00:00 2001 From: Ryan Nowakowski Date: Mon, 2 Jun 2014 22:49:43 -0500 Subject: [PATCH] Unicode method on model should return unicode The example of a __unicode__ model method should return a unicode value instead of a string. --- docs/ref/models/instances.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 2cbce35447..45c538a782 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -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