Loading docs/ref/templates/builtins.txt +7 −7 Original line number Diff line number Diff line Loading @@ -2450,24 +2450,24 @@ If ``value`` is ``Joel is a slug``, the output would be:: yesno ^^^^^ Maps values for true, false and (optionally) None, to the strings "yes", "no", "maybe", or a custom mapping passed as a comma-separated list, and Maps values for ``True``, ``False``, and (optionally) ``None``, to the strings "yes", "no", "maybe", or a custom mapping passed as a comma-separated list, and returns one of those strings according to the value: For example:: {{ value|yesno:"yeah,no,maybe" }} ========== ====================== ================================== ========== ====================== =========================================== Value Argument Outputs ========== ====================== ================================== ========== ====================== =========================================== ``True`` ``yes`` ``True`` ``"yeah,no,maybe"`` ``yeah`` ``False`` ``"yeah,no,maybe"`` ``no`` ``None`` ``"yeah,no,maybe"`` ``maybe`` ``None`` ``"yeah,no"`` ``"no"`` (converts None to False if no mapping for None is given) ========== ====================== ================================== ``None`` ``"yeah,no"`` ``no`` (converts ``None`` to ``False`` if no mapping for ``None`` is given) ========== ====================== =========================================== Internationalization tags and filters ------------------------------------- Loading Loading
docs/ref/templates/builtins.txt +7 −7 Original line number Diff line number Diff line Loading @@ -2450,24 +2450,24 @@ If ``value`` is ``Joel is a slug``, the output would be:: yesno ^^^^^ Maps values for true, false and (optionally) None, to the strings "yes", "no", "maybe", or a custom mapping passed as a comma-separated list, and Maps values for ``True``, ``False``, and (optionally) ``None``, to the strings "yes", "no", "maybe", or a custom mapping passed as a comma-separated list, and returns one of those strings according to the value: For example:: {{ value|yesno:"yeah,no,maybe" }} ========== ====================== ================================== ========== ====================== =========================================== Value Argument Outputs ========== ====================== ================================== ========== ====================== =========================================== ``True`` ``yes`` ``True`` ``"yeah,no,maybe"`` ``yeah`` ``False`` ``"yeah,no,maybe"`` ``no`` ``None`` ``"yeah,no,maybe"`` ``maybe`` ``None`` ``"yeah,no"`` ``"no"`` (converts None to False if no mapping for None is given) ========== ====================== ================================== ``None`` ``"yeah,no"`` ``no`` (converts ``None`` to ``False`` if no mapping for ``None`` is given) ========== ====================== =========================================== Internationalization tags and filters ------------------------------------- Loading