From 60b46d72ac81dc5a54b4eaa8ccf1159f83666aa9 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 24 Oct 2006 21:30:38 +0000 Subject: 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 --- docs/templates.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs') 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 ==================== -- cgit v1.3