Fixed #381 -- Clarified tutorial 1. Thanks, ssteiner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
33f2304ea9
commit
297731c657
|
@ -345,8 +345,9 @@ free Python API Django gives you::
|
|||
[<Poll object>]
|
||||
|
||||
Wait a minute. ``<Poll object>`` is, utterly, an unhelpful representation of
|
||||
this object. Let's fix that by editing the polls model and adding a
|
||||
``__repr__()`` method to both ``Poll`` and ``Choice``::
|
||||
this object. Let's fix that by editing the polls model
|
||||
(in the ``polls/models/polls.py`` file) and adding a ``__repr__()`` method to
|
||||
both ``Poll`` and ``Choice``::
|
||||
|
||||
class Poll(meta.Model):
|
||||
# ...
|
||||
|
|
Loading…
Reference in New Issue