Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#25051 closed Cleanup/optimization (fixed)

now template tag documentation

Reported by: Mark Tranchant Owned by: nobody
Component: Documentation Version: master
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


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 Changed 4 years ago by Baptiste Mispelon

Triage Stage: UnreviewedAccepted

Good idea, thanks.

comment:2 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In a871cf42:

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

comment:3 Changed 4 years ago by Tim Graham <timograham@…>

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