Kaydet (Commit) 6023312d authored tarafından Maxime Lorant's avatar Maxime Lorant Kaydeden (comit) Tim Graham

Fixed formatting in docs/ref/templates/builtins.txt

üst 3caf7efb
...@@ -2450,24 +2450,24 @@ If ``value`` is ``Joel is a slug``, the output would be:: ...@@ -2450,24 +2450,24 @@ If ``value`` is ``Joel is a slug``, the output would be::
yesno yesno
^^^^^ ^^^^^
Maps values for true, false and (optionally) None, to the strings "yes", "no", Maps values for ``True``, ``False``, and (optionally) ``None``, to the strings
"maybe", or a custom mapping passed as a comma-separated list, and "yes", "no", "maybe", or a custom mapping passed as a comma-separated list, and
returns one of those strings according to the value: returns one of those strings according to the value:
For example:: For example::
{{ value|yesno:"yeah,no,maybe" }} {{ value|yesno:"yeah,no,maybe" }}
========== ====================== ================================== ========== ====================== ===========================================
Value Argument Outputs Value Argument Outputs
========== ====================== ================================== ========== ====================== ===========================================
``True`` ``yes`` ``True`` ``yes``
``True`` ``"yeah,no,maybe"`` ``yeah`` ``True`` ``"yeah,no,maybe"`` ``yeah``
``False`` ``"yeah,no,maybe"`` ``no`` ``False`` ``"yeah,no,maybe"`` ``no``
``None`` ``"yeah,no,maybe"`` ``maybe`` ``None`` ``"yeah,no,maybe"`` ``maybe``
``None`` ``"yeah,no"`` ``"no"`` (converts None to False ``None`` ``"yeah,no"`` ``no`` (converts ``None`` to ``False``
if no mapping for None is given) if no mapping for ``None`` is given)
========== ====================== ================================== ========== ====================== ===========================================
Internationalization tags and filters Internationalization tags and filters
------------------------------------- -------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment