Opened 9 years ago

Closed 9 years ago

#25358 closed Cleanup/optimization (fixed)

Improve variable name for question in tutorial

Reported by: Alasdair Nicol Owned by: nobody
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: alasdair@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (5)

comment:1 by Alasdair Nicol, 9 years ago

Has patch: set

comment:2 by Aymeric Augustin, 9 years ago

Since we don't have a workflow for updating 1.7 translations, we avoid backporting changes in translatable text to 1.7.

in reply to:  2 comment:3 by Alasdair Nicol, 9 years ago

Replying to aaugustin:

Since we don't have a workflow for updating 1.7 translations, we avoid backporting changes in translatable text to 1.7.

Thanks, I wasn't aware of that. On second thoughts, having a different version in 1.7 and 1.8+ wouldn't be too big a problem, since the changes are self contained within each view (you don't even need to update the related template, since the old and new versions both use question in the template context. On the other hand, I'd understand if you think this is too minor a change and won't fix it.

comment:4 by Aymeric Augustin, 9 years ago

Triage Stage: UnreviewedAccepted

I think it's a worthwhile improvement.

comment:5 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 19f98946:

Fixed #25358 -- Improved variable name for question in tutorial.

Note: See TracTickets for help on using tickets.
Back to Top