Changes between Initial Version and Version 1 of Ticket #27354


Ignore:
Timestamp:
Oct 16, 2016, 12:27:44 PM (8 years ago)
Author:
Nick Mow
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27354 – Description

    initial v1  
    99However, the variable was created as {{{pub_date__year}}} (not {{{question__pub_date__year}}}) in a previous section of the same page:
    1010
    11 {{{from django.utils import timezone}}}
    12 {{{current_year = timezone.now().year}}}
    13 {{{Question.objects.get(pub_date__year=current_year)}}}
    14 {{{<Question: What's up?>}}}
     11{{{
     12# Get the question that was published this year.
     13>>> from django.utils import timezone
     14>>> current_year = timezone.now().year
     15>>> Question.objects.get(pub_date__year=current_year)
     16<Question: What's up?>
     17}}}
Back to Top