diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-10-24 21:30:38 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-10-24 21:30:38 +0000 |
| commit | 60b46d72ac81dc5a54b4eaa8ccf1159f83666aa9 (patch) | |
| tree | 8c9a13cab02aed9890c11959f8a5c8f7ddcbe4ce /docs | |
| parent | fa49edc7bdeb77d621c607ec08a5203357ea6859 (diff) | |
Fixed #648 -- Added comment syntax to template system: {# #}. Thanks for the patch, mccutchen@gmail.com and Hawkeye
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/templates.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/templates.txt b/docs/templates.txt index b263a64aec..0f0009b495 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -109,6 +109,21 @@ Some tags require beginning and ending tags (i.e. below describes all the built-in tags. You can create your own tags, if you know how to write Python code. +Comments +======== + +**New in Django development version** + +To comment-out part of a template, use the comment syntax: ``{# #}``. + +For example, this template would render as ``'hello'``:: + + {# greeting #}hello + +A comment can contain any template code, invalid or not. For example:: + + {# {% if foo %}bar{% else %} #} + Template inheritance ==================== |
