#15761: Clarity
-----------------------------------+------------------------------
 Reporter:  chris.is.fun+django@…  |         Owner:  nobody
     Type:  Cleanup/optimization   |        Status:  new
Milestone:                         |     Component:  Documentation
  Version:  1.3                    |      Severity:  Normal
 Keywords:  tutorial               |  Triage Stage:  Unreviewed
Has patch:  0                      |
-----------------------------------+------------------------------
 Three suggestions to make this clearer for us newbs.


 First, when you refer to /django/contrib/ it would be good to give a few
 examples of where that might be, like for Ubuntu it's /var/python-
 support/python2.6/django/contrib/. That wasn't obvious to me.

 Second, '''Use the template system''' was unclear in the following way.

 {{{
 <h1>{{ poll.question }}</h1>
 <ul>
 {% for choice in poll.choice_set.all %}
     <li>{{ choice.choice }}</li>
 {% endfor %}
 </ul>
 }}}



 it's unclear which "poll" is being referred to:  the model Poll, the
 foreign key poll, or the poll that was passed from p through a dictionary
 in the view. (I think "view" is the place it was passed.)

 Also it's confusing when you refer to a set as X and a member of the set
 as X. Maybe in the above you could do

 {{{
 {% for c in poll_fk.choice_set.all %}
 {{c.choice}}
 {% endfor%}
 }}}

 or maybe it's {{{ {{choice.c}} }}}, I can't tell whether the set or the
 member comes first.




 Finally choice_set is an infelicitous word because "choice set" could
 refer to the result of like a SQL query or many other sets of choices.
 Maybe in a newer version of the tutorial you could name the models
 differently. How about "polls" and "answers" ?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15761>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to