#25358: Improve variable name for question in tutorial
--------------------------------------+--------------------
     Reporter:  alasdairnicol         |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Documentation         |    Version:  master
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 In the docs, Tutorial 4 uses the variable `p` for question. I think this
 is historical, because the model used to be named `Poll` before #20876.

 {{{
 p = get_object_or_404(Question, pk=question_id)
 }}}

 I think that `q` would be an improvement, but `question` would be better.

 If we make this change, ideally we would backport to the 1.7.X and 1.8.X
 docs, because I've seen users get confused when they mistakenly switch
 between different versions in the tutorial. My patch causes a minor
 conflict when applied to 1.7.X and 1.8.X, but wouldn't be too hard to fix.

--
Ticket URL: <https://code.djangoproject.com/ticket/25358>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/056.a349e5b6aad3e37f58eb94fc68201daf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to