summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-13 16:50:00 -0500
committerTim Graham <timograham@gmail.com>2016-12-14 10:33:51 -0500
commit92c5eeac3358e8243e29604d51b724f46fd5305f (patch)
treede691be2b05c905eb71934eee8870ffa76759462 /docs
parent7da37699e8d7124f5d0cfaba931772333c24ef83 (diff)
Fixed #27598 -- Allowed specifying directories for a filesystem template loader.
Thanks Carl Meyer for review.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/templates/api.txt20
-rw-r--r--docs/releases/1.11.txt3
2 files changed, 23 insertions, 0 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index 55a1a314b1..2057c370f3 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -847,6 +847,26 @@ loaders that come with Django:
'DIRS': [os.path.join(BASE_DIR, 'templates')],
}]
+ You can also override ``'DIRS'`` and specify specific directories for a
+ particular filesystem loader::
+
+ TEMPLATES = [{
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'OPTIONS': {
+ 'loaders': [
+ (
+ 'django.template.loaders.filesystem.Loader',
+ [os.path.join(BASE_DIR, 'templates')],
+ ),
+ ],
+ },
+ }]
+
+ .. versionchanged:: 1.11
+
+ The ability to specify directories for a particular filesystem loader
+ was added.
+
``django.template.loaders.app_directories.Loader``
.. class:: app_directories.Loader
diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt
index 2035588af6..0dc2b27bde 100644
--- a/docs/releases/1.11.txt
+++ b/docs/releases/1.11.txt
@@ -391,6 +391,9 @@ Templates
* Added a :ttag:`resetcycle` template tag to allow resetting the sequence of
the :ttag:`cycle` template tag.
+* You can now specify specific directories for a particular
+ :class:`filesystem.Loader <django.template.loaders.filesystem.Loader>`.
+
Tests
~~~~~