mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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
This commit is contained in:
@@ -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
|
||||
====================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user