Opened 5 years ago

Closed 5 years ago

#20336 closed Bug (fixed)

Outdated paragraph in {% ifequal %} documentation

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


The documentation for {% ifequal %} [1] says:

It is only possible to compare an argument to template variables or strings.
You cannot check for equality with Python objects such as True or False.
If you need to test if something is true or false, use the if tag instead.

However, django 1.5 introduced True and False in templates which means it's now possible to do {% ifequal foo True %}.

I think this paragraph can simply be deleted.


Change History (1)

comment:1 Changed 5 years ago by Aymeric Augustin <aymeric.augustin@…>

Resolution: fixed
Status: newclosed

In ce45240df4e2b424ff4852b1cc71d01a031457c9:

Fixed #20336 -- Removed obsolete paragraph from the docs.

Thanks Baptiste Mispelon.

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