I'd like to propose python-like tuple syntax for templates and grouping brackets for filter expressions.
{% for x in ("default", var, f|exp) %} ... {% endfor%} {{ x|yesno:("yes", "no", "maybe") }} {% something (1,2,3,4)|slice:(start, stop) %} {% if x|contains:(foo|last) %} ... {% endif %} This could be used to fix #1199 (Supporting more than one argument in a custom filter) but argc checks would have to be part of the filter implementation (possibly some kind of @unpack_filter_args decorator). I have a working patch on top of my template refactoring branch[1] at http://dpaste.com/hold/90575/ It contains a backwards compatible, exemplary change for |yesno. [1] http://github.com/emulbreh/django/tree/master --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---