diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/templates/api.txt | 20 |
1 files changed, 20 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 |
