Opened 8 years ago

Last modified 8 years ago

#27354 closed Bug

Incorrect variable name given in tutorial — at Version 1

Reported by: Nick Mow Owned by: nobody
Component: Documentation Version: 1.10
Severity: Normal Keywords: tutorial, 1.10
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Nick Mow)

Bug found here: https://docs.djangoproject.com/en/1.10/intro/tutorial02/

On part 2 (Databases) of the Django tutorial v1.10, the following line is given:

>>> Choice.objects.filter(question__pub_date__year=current_year)

However, the variable was created as pub_date__year (not question__pub_date__year) in a previous section of the same page:

# Get the question that was published this year.
>>> from django.utils import timezone
>>> current_year = timezone.now().year
>>> Question.objects.get(pub_date__year=current_year)
<Question: What's up?>

Change History (1)

comment:1 by Nick Mow, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top