summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/templates/api.txt20
1 files changed, 15 insertions, 5 deletions
diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt
index ec01fe2faa..bd2b4c6e9d 100644
--- a/docs/ref/templates/api.txt
+++ b/docs/ref/templates/api.txt
@@ -649,14 +649,24 @@ class. Here are the template loaders that come with Django:
INSTALLED_APPS = ('myproject.polls', 'myproject.music')
- ...then ``get_template('foo.html')`` will look for templates in these
+ ...then ``get_template('foo.html')`` will look for ``foo.html`` in these
directories, in this order:
- * ``/path/to/myproject/polls/templates/foo.html``
- * ``/path/to/myproject/music/templates/foo.html``
+ * ``/path/to/myproject/polls/templates/``
+ * ``/path/to/myproject/music/templates/``
- Note that the loader performs an optimization when it is first imported: It
- caches a list of which :setting:`INSTALLED_APPS` packages have a
+ ... and will use the one it finds first.
+
+ The order of :setting:`INSTALLED_APPS` is significant! For example, if you
+ want to customize the Django admin, you might choose to override the
+ standard ``admin/base_site.html`` template, from ``django.contrib.admin``,
+ with your own ``admin/base_site.html`` in ``myproject.polls``. You must
+ then make sure that your ``myproject.polls`` comes *before*
+ ``django.contrib.admin`` in :setting:`INSTALLED_APPS`, otherwise
+ ``django.contrib.admin``'s will be loaded first and yours will be ignored.
+
+ Note that the loader performs an optimization when it is first imported:
+ it caches a list of which :setting:`INSTALLED_APPS` packages have a
``templates`` subdirectory.
This loader is enabled by default.