﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23913	= comparison does work in templates although it shouldn't	Philipp Metzler	Ola Sitarska	"There's no = operator documented: https://docs.djangoproject.com/en/1.7/ref/templates/builtins/#operator

For comparisons we use the == operator as = does assign values in most languages. In JavaScript the = assignment for example always returns true here:

<script language=""javascript"">
    a = 'foo';
    b = 'bar';

    if (a=b) {
        alert('assignment always returns true here')
    }
</script>

BUT in the Django templates = does work like a comparison operator:

{% if ""a"" = ""a"" %}TRUE but Django should throw an error because there's no = operator{% endif %}

{% if ""a"" = ""b"" %}Django doesn't return True here{% endif %}

I think this is highly misleading and confusing."	Cleanup/optimization	closed	Template system	dev	Normal	fixed	1.8-alpha	django@…	Ready for checkin	1	0	0	0	0	0
