summaryrefslogtreecommitdiff
path: root/docs/ref/models
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-03-22 21:30:49 +0100
committerClaude Paroz <claude@2xlibre.net>2014-03-22 21:32:20 +0100
commit3a97f992fbfbcf8b0480875b257e5d541a4b8315 (patch)
treec5ac40df266f098c5b7b1378864685869fe2a324 /docs/ref/models
parent232181d1c5307d9af5fc292682661e91439a9289 (diff)
Fixed #22313 -- Removed 'u' prefixes from documentation
Diffstat (limited to 'docs/ref/models')
-rw-r--r--docs/ref/models/instances.txt12
-rw-r--r--docs/ref/models/querysets.txt4
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index 21bcba4636..ba84f2de81 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -449,7 +449,7 @@ For example::
last_name = models.CharField(max_length=50)
def __unicode__(self):
- return u'%s %s' % (self.first_name, self.last_name)
+ return '%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
@@ -724,9 +724,9 @@ For example::
class Person(models.Model):
SHIRT_SIZES = (
- (u'S', u'Small'),
- (u'M', u'Medium'),
- (u'L', u'Large'),
+ ('S', 'Small'),
+ ('M', 'Medium'),
+ ('L', 'Large'),
)
name = models.CharField(max_length=60)
shirt_size = models.CharField(max_length=2, choices=SHIRT_SIZES)
@@ -736,9 +736,9 @@ For example::
>>> p = Person(name="Fred Flintstone", shirt_size="L")
>>> p.save()
>>> p.shirt_size
- u'L'
+ 'L'
>>> p.get_shirt_size_display()
- u'Large'
+ 'Large'
.. method:: Model.get_next_by_FOO(\**kwargs)
.. method:: Model.get_previous_by_FOO(\**kwargs)
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index f10f66425a..ac552bf0c7 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -484,7 +484,7 @@ A few subtleties that are worth mentioning:
For example::
>>> Entry.objects.values()
- [{'blog_id': 1, 'headline': u'First Entry', ...}, ...]
+ [{'blog_id': 1, 'headline': 'First Entry', ...}, ...]
>>> Entry.objects.values('blog')
[{'blog': 1}, ...]
@@ -554,7 +554,7 @@ respective field passed into the ``values_list()`` call — so the first item is
the first field, etc. For example::
>>> Entry.objects.values_list('id', 'headline')
- [(1, u'First entry'), ...]
+ [(1, 'First entry'), ...]
If you only pass in a single field, you can also pass in the ``flat``
parameter. If ``True``, this will mean the returned results are single values,