I don't know whether it's possible, but I'd like to be able to write something like the following:

{% with var1 var2 var3 as some_list %}
    {{ some_list|maximum }}
{% endwith %}

Creating a list on the fly from an arbitrary number of template variables and/or literals seems useful, so I'm hopeful that I've overlooked something simple.

Failing that, though, I'd like to know how to create a template tag which accepts an arbitrary number of arguments. (I've played around with simple_tag, which works well for tags which accept a fixed number of arguments.)

I don't want to go to the trouble of creating a parser and subclassing django.template.Node until I've ascertained that there's no simpler solution.

Edit
Report