From 1a49b8947033fd667310b1b996330a8e119fcbf9 Mon Sep 17 00:00:00 2001 From: Collin Anderson Date: Sat, 8 Apr 2017 14:38:48 -0400 Subject: Fixed #27953 -- Added instance's pk to Model.__str__(). --- docs/intro/tutorial02.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/intro/tutorial02.txt') diff --git a/docs/intro/tutorial02.txt b/docs/intro/tutorial02.txt index 48e4ac7e7d..5eca45ee09 100644 --- a/docs/intro/tutorial02.txt +++ b/docs/intro/tutorial02.txt @@ -437,11 +437,11 @@ Once you're in the shell, explore the :doc:`database API `:: # objects.all() displays all the questions in the database. >>> Question.objects.all() - ]> + ]> -Wait a minute. ```` is, utterly, an unhelpful representation -of this object. Let's fix that by editing the ``Question`` model (in the -``polls/models.py`` file) and adding a +Wait a minute. ```` isn't a helpful +representation of this object. Let's fix that by editing the ``Question`` model +(in the ``polls/models.py`` file) and adding a :meth:`~django.db.models.Model.__str__` method to both ``Question`` and ``Choice``: -- cgit v1.3