From: Armin Ronacher Date: Thu, 11 Sep 2008 18:46:34 +0000 (+0200) Subject: filter -> test in the tests section (i feel so embarrassed). X-Git-Tag: 2.1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5d8f55ea552941df0814953226d7279d6de886c;p=thirdparty%2Fjinja.git filter -> test in the tests section (i feel so embarrassed). --HG-- branch : trunk --- diff --git a/docs/api.rst b/docs/api.rst index d7ed8449..41949c8b 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -528,13 +528,13 @@ active :class:`Context` rather then the environment. Custom Tests ------------ -Tests work like filters just that there is no way for a filter to get access +Tests work like filters just that there is no way for a test to get access to the environment or context and that they can't be chained. The return -value of a filter should be `True` or `False`. The purpose of a filter is to +value of a test should be `True` or `False`. The purpose of a test is to give the template designers the possibility to perform type and conformability checks. -Here a simple filter that checks if a variable is a prime number:: +Here a simple test that checks if a variable is a prime number:: import math