Documented the permitted syntax for template variable names.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2010-09-13 05:08:24 +00:00
parent 3d99526fc2
commit 783656cf5b
1 changed files with 5 additions and 1 deletions

View File

@ -79,7 +79,11 @@ Variables
Variables look like this: ``{{ variable }}``. When the template engine
encounters a variable, it evaluates that variable and replaces it with the
result.
result. Variable names consist of any combination of alphanumeric characters
and the underscore (``"_"``). The dot (``"."``) also appears in variable
sections, although that has a special meaning, as indicated below.
Importantly, *you cannot have spaces or punctuation characters in variable
names.*
Use a dot (``.``) to access attributes of a variable.