added missing documentation for the random function

This commit is contained in:
Fabien Potencier
2011-12-18 12:16:35 +01:00
parent 89a1519e09
commit 2928191769
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ Functions
range
cycle
constant
random
attribute
block
parent
+11
View File
@@ -0,0 +1,11 @@
``random``
==========
.. versionadded:: 1.5
The random function was added in Twig 1.5.
The ``random`` function returns a random item from a sequence:
.. code-block:: jinja
{{ random(['apple', 'orange', 'citrus']) }}