#23913: = comparison does work in templates although it shouldn't
-------------------------------------+-------------------------------------
     Reporter:  googol7              |                    Owner:
         Type:                       |  olasitarska
  Cleanup/optimization               |                   Status:  assigned
    Component:  Template system      |                  Version:  master
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by kezabelle):

 Replying to [comment:3 aaugustin]:
 > I'm not convinced we should make this change. It looks like something
 that could break existing templates on stable websites.
 > I understand that the reporter was confused but I don't remember other
 similar reports.

 I believe '''a''' change is required:
 - Deprecate and eventually pull out the functionality (earliest
 opportunity being 1.9) '''or'''
 - Stabilise the parsing (`{% if 1 = 1 %}` vs `{% if 1=1 %}`) test and
 document it, so that the principle of least surprise is minimised.

 The fact that there may be code out there that might accidentally work
 because of the right combination of typos (one equals sign, enough spaces)
 seems a mis-step that could be rectified (or made authoritatively
 correct).

 It's also a quirk that doesn't fit with equality vs assignment in Python
 (and thus Django).

--
Ticket URL: <https://code.djangoproject.com/ticket/23913#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.7a36fed3cde68c09238953075a8dfd9c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to