diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/templates/api.txt | 20 | ||||
| -rw-r--r-- | docs/releases/1.11.txt | 3 |
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 ~~~~~ |
