diff options
| author | Vitaly Bogomolov <mail@vitaly-bogomolov.ru> | 2016-03-24 11:39:37 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-05-07 16:21:57 -0400 |
| commit | aec4f97555cbfc9d14d698f61d43a478f5911661 (patch) | |
| tree | 9c866ff43cae89b657699968dc47d1552f1a9d61 /docs | |
| parent | ad403ffa45db3becc2fec727212538446b40d380 (diff) | |
Fixed #26402 -- Added relative path support in include/extends template tags.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/templates/builtins.txt | 27 | ||||
| -rw-r--r-- | docs/releases/1.10.txt | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 6c766c8a14..ed904b1872 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -212,6 +212,26 @@ 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:: + + dir1/ + template.html + base2.html + my/ + base3.html + base1.html + +In ``template.html``, the following paths would be valid:: + + {% extends "./base2.html" %} + {% extends "../base1.html" %} + {% extends "./my/base3.html" %} + +.. versionadded:: 1.10 + + The ability to use relative paths was added. + .. templatetag:: filter ``filter`` @@ -663,6 +683,13 @@ 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. + +.. versionadded:: 1.10 + + The ability to use a relative path was added. + This example includes the contents of the template whose name is contained in the variable ``template_name``:: diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index dd874e2ae8..0d808a9454 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -451,6 +451,9 @@ Templates * The :func:`~django.template.context_processors.debug` context processor contains queries for all database aliases instead of only the default alias. +* Added relative path support for string arguments of the :ttag:`extends` and + :ttag:`include` template tags. + Tests ~~~~~ |
