Opened 11 years ago

Closed 11 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

Description

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.

[1] https://docs.djangoproject.com/en/1.5/ref/templates/builtins/#ifequal

Change History (1)

comment:1 by Aymeric Augustin <aymeric.augustin@…>, 11 years ago

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