Hi,

I'd like to raise this topic for renewed discussion. I think it is time to
begin deprecating the obsolete template tags. So +1 for removal.

I had all but forgotten about the {% ifequal %} template tag and then
eventually stumbled across it doing unrelated work. Upon rediscovering it
as a practical duplicate of {% if %}, I thought I'd help out Django by
deprecating it for eventual removal so that we're back to "one -- and
preferably only one -- obvious way to do it". I created the PR to begin the
deprecation here: https://github.com/django/django/pull/12851

We're now coming up on 10 years since Django 1.2 was released with the
smart if template tag. Projects and third party apps have had a generous
extended time to update their code.

For projects that don't follow Django releases in detail, they may not be
aware that the {% ifequal %} tag is obsolete and so have not had any
motivation to change. Adding a deprecation warning may help such projects
to understand they should update their templates.

For projects that find it is a burden to update, they've had 10 years to do
so. I think adding more time isn't what they need at this point. The actual
upgrade can be mostly automated with sed (I could even put a recommended
command in the release notes). So the update doesn't need to be very time
consuming.

While perhaps we agree leaving old code around can mostly go unnoticed,
technical debt has subtle ways of showing up. For example, time was spent
by me rediscovering this feature exists and wondering why there are two way
to write {% if ... %} (this could happen to other contributors studying the
template tag system). Time has been spent on this mailing list discussing
what to do with old unused code. Its tests -- which mostly don't matter at
this point -- run on every PR and in local environments. If there is ever
an attempt at an internal refactoring of the template code, the ifequal tag
will need to be considered and maintained. And so on.

On Sun, Aug 9, 2015 at 12:37 PM Collin Anderson <cmawebs...@gmail.com>
wrote:

> Hi All,
>
> I really like the "don't use this on new code, but there's no rush in
> replacing it" category. I think that's really important to have that in a
> project that's this old. I think it would be great to minimize the amount
> required changes that need to be done.
>
> Thanks,
> Collin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/2ddf20f1-af1a-47c1-b07c-669818846b53%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/2ddf20f1-af1a-47c1-b07c-669818846b53%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CADhq2b5%3D3A03OjPTGa7mUgm-7braWgJwLUU_xW5pFJrgPP6Uow%40mail.gmail.com.

Reply via email to