Opened 12 years ago

Closed 12 years ago

#19983 closed Cleanup/optimization (needsinfo)

Improving this part from confusion

Reported by: fourmikichante@… Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

At the point where we are asked to add the unicode method, the tutorial seems to be taking a shortcut by saying :

*
Wait a minute. <Poll: Poll object> is, utterly, an unhelpful representation of this object. Let’s fix that by editing the polls model (in the polls/models.py file) and adding a unicode() method to both Poll and Choice:

class Poll(models.Model):

# ...
def unicode(self):

return self.question

class Choice(models.Model):

# ...
def unicode(self):

return self.choice_text

*

This was very confusing to me, and though i managed to put bits of code together and make this work, I have no idea whether or not i did it right.

Could you perhaps improve this part of the tutorial by being more comprehensive ?

Change History (2)

comment:1 by Tim Graham, 12 years ago

Thanks for the feedback. Could you please be a bit more specific about what you found confusing and offer a suggestion for how to improve it?

comment:2 by Tim Graham, 12 years ago

Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top