From e0208944708aa9e1034531a047a731b1c93b50c6 Mon Sep 17 00:00:00 2001 From: Bryce Nesbitt Date: Mon, 2 Jun 2014 13:19:12 -0700 Subject: [PATCH] Fixed #22753 -- Documented ability to use a note with the {% comment %} tag. --- docs/ref/templates/builtins.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 0a5a64f782..0e1266e0fb 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -52,11 +52,13 @@ comment ^^^^^^^ Ignores everything between ``{% comment %}`` and ``{% endcomment %}``. +An optional note may be inserted in the first tag. For example, this is +useful when commenting out code for documenting why the code was disabled. Sample usage::

Rendered text with {{ pub_date|date:"c" }}

- {% comment %} + {% comment "Optional note" %}

Commented out text with {{ create_date|date:"c" }}

{% endcomment %}