summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-08-28 20:59:56 +0200
committerClaude Paroz <claude@2xlibre.net>2012-08-29 11:20:32 +0200
commitebc773ada3e4f40cf5084268387b873d7fe22e8b (patch)
tree88e136b190e480ed4c8c2310de408a268f4367b2 /docs/ref/models
parent9eafb6592e9ed27a59cb3cd9920c44cf230a6c65 (diff)
Replaced many smart_bytes by force_bytes
In all those occurrences, we didn't care about preserving the lazy status of the strings, but we really wanted to obtain a real bytestring.
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/instances.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index b7ae3890cf..b01abc1936 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -459,9 +459,9 @@ using ``__str__()`` like this::
last_name = models.CharField(max_length=50)
def __str__(self):
- # Note use of django.utils.encoding.smart_bytes() here because
+ # Note use of django.utils.encoding.force_bytes() here because
# first_name and last_name will be unicode strings.
- return smart_bytes('%s %s' % (self.first_name, self.last_name))
+ return force_bytes('%s %s' % (self.first_name, self.last_name))
``get_absolute_url``
--------------------