From 1f2e4f9cfe26dd9ad1fc85375c1dce38c65bbe6b Mon Sep 17 00:00:00 2001 From: Anupam Date: Sat, 3 Jun 2017 17:41:04 +0530 Subject: [PATCH] Fixed #28190 -- Clarifed how include/extends treat template names. --- docs/ref/templates/builtins.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index daf4f9abe1..49375e0c0b 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -215,8 +215,9 @@ This tag can be used in two ways: See :ref:`template-inheritance` for more information. -A string argument may be a relative path starting with ``./`` or ``../``. For -example, assume the following directory structure:: +Normally the template name is relative to the template loader's root directory. +A string argument may also be a relative path starting with ``./`` or ``../``. +For example, assume the following directory structure:: dir1/ template.html @@ -674,8 +675,9 @@ This example includes the contents of the template ``"foo/bar.html"``:: {% include "foo/bar.html" %} -A string argument may be a relative path starting with ``./`` or ``../`` as -described in the :ttag:`extends` tag. +Normally the template name is relative to the template loader's root directory. +A string argument may also be a relative path starting with ``./`` or ``../`` +as described in the :ttag:`extends` tag. This example includes the contents of the template whose name is contained in the variable ``template_name``::