From 783656cf5ba0e38fb0bf915019e6a720d47a9baf Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Mon, 13 Sep 2010 05:08:24 +0000 Subject: [PATCH] Documented the permitted syntax for template variable names. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13822 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/topics/templates.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt index 492d23d716..c3fdd2cf0e 100644 --- a/docs/topics/templates.txt +++ b/docs/topics/templates.txt @@ -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.