Django snippets: Smart {% if %} template tag. Chris Beaven’s drop-in replacement for Django’s {% if %} tag that adds comparison operators (less than, greater than, not equal etc) while staying backwards compatible with the less able original. I love it. This is one place where I no longer favour Django’s stated philosophy: I think it’s perfectly reasonable to use comparisons in presentation logic, and I’ve found that in my own code the lack of an advanced if tag frequently leads to pure presentation logic sneaking in to my view functions.
I totally agree with you. Sometimes Django purism crashes with its intentions to be a pragmatic framework for developers with deadlines. Specially when I have to integrate some HTML code from a design agency into my app. Hell.
Totally agreed, I wish that this was one area that more attention was given to from the framework.
Thanks for the coverage!
John Weis - 3rd March 2009 16:18 - #
So, will you make your voice heard among the core devs, Simon?
Julian - 3rd March 2009 17:05 - #
Using Jinja2 on another project has spoiled me to a large extent when it comes to the template system.
As someone working on a small team where the templating is done basically by the same people who write the views, I found Django templates to be a major pain for this reason, and swapped them out for Mako, even for third-party apps (code to do that is in django-smorgasbord: http://smorgasbord.googlecode.com/). Django is pure pleasure for us now.
Jacob Smullyan - 3rd March 2009 18:26 - #