Function
Function
Takes a list of dicts, returns that list sorted by the property given in the argument.
Function
Takes a list of dicts, returns that list sorted in reverse order by the property given in the argument.
Function
Returns the first item in a list
Function
Joins a list with a string, like Python's ``str.join(list)``
Django throws a compile error, but JS can't do arg checks so we're left with run time errors, which aren't wise for something as trivial here as an empty arg.
Function
Returns the length of the value - useful for lists
Function
Returns a boolean of whether the value's length is the argument
Function
Returns a random item from the list
Function
Returns a slice of the list.
Uses the same syntax as Python's list slicing; see http://diveintopython.org/native_data_types/lists.html#odbchelper.list.slice for an introduction. Also uses the optional third value to denote every X item.
Function
Function
Recursively takes a self-nested list and returns an HTML unordered list -- WITHOUT opening and closing <ul> tags.
The list is assumed to be in the proper format. For example, if ``var`` contains
``['States', [['Kansas', [['Lawrence', []], ['Topeka', []]]], ['Illinois', []]]]``,
then ``{{ var|unordered_list }}`` would return::
<li>States
<ul>
<li>Kansas
<ul>
<li>Lawrence</li>
<li>Topeka</li>
</ul>
</li>
<li>Illinois</li>
</ul>
</li>Object
Object
Object
Object