diff options
| author | Jason Pellerin <jpellerin@gmail.com> | 2006-09-08 16:35:39 +0000 |
|---|---|---|
| committer | Jason Pellerin <jpellerin@gmail.com> | 2006-09-08 16:35:39 +0000 |
| commit | 84f7a2133c4d553a234165bb8cbfaf70681bb028 (patch) | |
| tree | 53d08c1ffc275a4e1d62d7f48ea81172a5919051 /docs/templates_python.txt | |
| parent | ae3896cb74d4bc42acaf6fade0d2a57e28045b2a (diff) | |
[multi-db] Merge trunk to [3737]. Some tests still failing.
git-svn-id: http://code.djangoproject.com/svn/django/branches/multiple-db-support@3739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/templates_python.txt')
| -rw-r--r-- | docs/templates_python.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/docs/templates_python.txt b/docs/templates_python.txt index aa7fa901b0..950b122339 100644 --- a/docs/templates_python.txt +++ b/docs/templates_python.txt @@ -198,9 +198,19 @@ some things to keep in mind: How invalid variables are handled ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If a variable doesn't exist, the template system inserts the value of the -``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''`` (the empty -string) by default. +Generally, if a variable doesn't exist, the template system inserts the +value of the ``TEMPLATE_STRING_IF_INVALID`` setting, which is set to ``''`` +(the empty string) by default. + +Filters that are applied to an invalid variable will only be applied if +``TEMPLATE_STRING_IF_INVALID`` is set to ``''`` (the empty string). If +``TEMPLATE_STRING_IF_INVALID`` is set to any other value, variable +filters will be ignored. + +This behavior is slightly different for the ``if``, ``for`` and ``regroup`` +template tags. If an invalid variable is provided to one of these template +tags, the variable will be interpreted as ``None``. Filters are always +applied to invalid variables within these template tags. Playing with Context objects ---------------------------- |
