News for hackers. Stuff that matters.
Re:Django snippets: Smart {% if %} template tag by jacquesm on Wednesday September 02, 2009 @07:42AM (#799883)
agreed. The 'crippling' has gone a bit too far I think, I can see the reason why they want to limit what you can do within a template but to not have the ability to combine expressions gets tedious really quickly.

The argument seems to be that a template designer should not be able to break the site, that's not a very strong one because after all any brace or % sign removed will break the site just fine.

Re:Django snippets: Smart {% if %} template tag by yummyfajitas on Wednesday September 02, 2009 @07:58AM (#799904)
I'm not entirely sure how

    {% if a == b %}
will break the site, but

    {% ifequal a b %}
will not. Maybe if someone destructively overloads __eq__?
Re:Django snippets: Smart {% if %} template tag by jacquesm on Wednesday September 02, 2009 @08:00AM (#799906)
I figure if I were a template designer I would treat anything between { and } as if it were radioactive.
Re:Django snippets: Smart {% if %} template tag by lacker on Wednesday September 02, 2009 @11:45AM (#800415)
ifequal uses __eq__ anyways.