Opened 8 years ago

Closed 8 years ago

#26118 closed New feature (fixed)

Add "is" comparison to the if template tag

Reported by: Preston Timmons Owned by: nobody
Component: Template system Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

It would be nice if the if template tag supported "is" comparisons against values like None, True, and False. This feature is particularly helpful in fixing #15667 when rendering boolean attributes on elements, where the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

Change History (3)

comment:1 by Preston Timmons, 8 years ago

Has patch: set

comment:2 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

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

Resolution: fixed
Status: newclosed

In c00ae7f5:

Fixed #26118 -- Added 'is' operator to if template tag.

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