--
Ticket URL: <https://code.djangoproject.com/ticket/25236>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Seems like a good idea, although I am afraid we may get more pushback
regarding "needless deprecations" from old, large Django projects that use
it. A middle ground could be to remove it from the documentation. Would
you like to write to the DevelopersMailingList to see what others think?
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:1>
* stage: Unreviewed => Accepted
Comment:
The smart if tag which made ifequal redundant was introduced in Django
1.2. Really, ifequal should have been deprecated then. I agree this is a
good candidate for deprecation, and I'd rather take a bit of flak for
"needless" deprecations than keep tested (?) but undocumented code around
forever.
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:2>
Comment (by pydanny):
Submitted to the dev mailing list.
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a3830f6d663aee9e91871002cbff7c57aee6d989" a3830f6]:
{{{
#!CommitTicketReference repository=""
revision="a3830f6d663aee9e91871002cbff7c57aee6d989"
Refs #25236 -- Removed ifequal/ifnotequal usage.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"787cc7aa843d5c0834f56b5f8ae03b86ce553c51" 787cc7a]:
{{{
#!CommitTicketReference repository=""
revision="787cc7aa843d5c0834f56b5f8ae03b86ce553c51"
Refs #25236 -- Discouraged use of ifequal/ifnotequal template tags.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:5>
* stage: Accepted => Someday/Maybe
Comment:
Moving to "Someday/Maybe" as we have multiple complaints on the
[https://groups.google.com/d/topic/django-
developers/J7vpMKSHk7U/discussion mailing list] that updating projects for
this removal will be too onerous to justify the cleanup.
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:6>
Comment (by Tim Graham <timograham@…>):
In [changeset:"2112879305d0c78bdb7460e55f70591c89790e39" 21128793]:
{{{
#!CommitTicketReference repository=""
revision="2112879305d0c78bdb7460e55f70591c89790e39"
[1.8.x] Refs #25236 -- Discouraged use of ifequal/ifnotequal template
tags.
Backport of 787cc7aa843d5c0834f56b5f8ae03b86ce553c51 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:7>
Comment (by felixxm):
[https://github.com/django/django/pull/12851 PR]. I think we should
refresh [https://groups.google.com/forum/#!topic/django-
developers/J7vpMKSHk7U/discussion discussion] on the mailing list.
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:8>
Comment (by Jon Dufresne):
The following quick and dirty script will update a codebase to the newer
`{% if %}` syntax. This will update files in place, so please be sure to
backup your code first, preferably with SCM. You should examine the
results of the diff for correctness before accepting.
{{{
find $(find -name templates) -type f -exec perl -pi -e 's/{% *ifequal
+(.+?) +(.+?) *%}/{% if $1 == $2 %}/;' -e 's/{% *endifequal *%}/{% endif
%}/;' -e 's/{% *ifnotequal +(.+?) +(.+?) *%}/{% if $1 != $2 %}/;' -e 's/{%
*endifnotequal *%}/{% endif %}/;' {} \;
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:9>
* owner: nobody => Jon Dufresne
* status: new => assigned
* has_patch: 0 => 1
Comment:
We didn't get any new complains on the mailing list, so it's time to
remove them.
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:10>
* stage: Someday/Maybe => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:11>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"72a170b4c3c4c2db8192bb1a6424bcc8eb533973" 72a170b]:
{{{
#!CommitTicketReference repository=""
revision="72a170b4c3c4c2db8192bb1a6424bcc8eb533973"
Fixed #25236 -- Deprecated {% ifequal %} and {% ifnotequal %} template
tags.
The {% if %} tag provides all features of these tags.
Since Django 1.2 (May 17, 2010), the docs have hinted that
{% ifequal %} and {% ifnotequal %} will be deprecated in a future
Django version. Time to make it official.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:12>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"e7208f13c0448387e56c340eed46e1ed9ef9997e" e7208f1]:
{{{
#!CommitTicketReference repository=""
revision="e7208f13c0448387e56c340eed46e1ed9ef9997e"
Refs #25236 -- Removed {% ifequal %} and {% ifnotequal %} template tags
per deprecation timeline.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25236#comment:13>