* ``odd``
* ``defined``
* ``sameas``
- * ``none``
+ * ``null``
* ``divisibleby``
* ``constant``
* ``empty``
<dt>Username</dt>
<dd>{{ forms.input('username') }}</dd>
<dt>Password</dt>
- <dd>{{ forms.input('password', none, 'password') }}</dd>
+ <dd>{{ forms.input('password', null, 'password') }}</dd>
</dl>
<p>{{ forms.textarea('comment') }}</p>
.. code-block:: jinja
<p>{{ forms.input('username') }}</p>
- <p>{{ forms.input('password', none, 'password') }}</p>
+ <p>{{ forms.input('password', null, 'password') }}</p>
If macros are defined and used in the same template, you can use the
special ``_self`` variable, without importing them:
* ``true`` / ``false``: ``true`` represents the true value, ``false``
represents the false value.
-* ``none``: ``none`` represents no specific value (the equivalent of ``null`` in
- PHP). This is the value returned when a variable does not exist.
+* ``null``: ``null`` represents no specific value. This is the value returned
+ when a variable does not exist. ``none`` is an alias for ``null``.
Arrays and hashes can be nested:
:maxdepth: 1
divisibleby
- none
+ null
even
odd
sameas
-``none``
+``null``
========
-``none`` returns ``true`` if the variable is ``none``:
+``null`` returns ``true`` if the variable is ``null``:
.. code-block:: jinja
- {{ var is none }}
+ {{ var is null }}
+
+.. note::
+
+ ``none`` is an alias for ``null``.