Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25051 closed Cleanup/optimization (fixed)

now template tag documentation

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

Description

The documentation here says:

You can also use the syntax {% now "Y" as current_year %} to store the output inside a variable.

I think it'd be worth clarifying that current_year will then be a string not an integer. I spent a while working out why {% if current_year > 2015 %} was returning True.

Change History (3)

comment:1 by Baptiste Mispelon, 9 years ago

Triage Stage: UnreviewedAccepted

Good idea, thanks.

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

Resolution: fixed
Status: newclosed

In a871cf42:

Fixed #25051 -- Clarified return type of {% now %} tag.

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

In 73cbf08:

[1.8.x] Fixed #25051 -- Clarified return type of {% now %} tag.

Backport of a871cf422d8f7a15d3029684538136e0c92f99dc from master

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