summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/views/static.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/views/static.py b/django/views/static.py
index c8ebf0c22d..8355950fe0 100644
--- a/django/views/static.py
+++ b/django/views/static.py
@@ -91,7 +91,8 @@ DEFAULT_DIRECTORY_INDEX_TEMPLATE = """
def directory_index(path, fullpath):
try:
- t = loader.get_template('static/directory_index.html')
+ t = loader.select_template(['static/directory_index.html',
+ 'static/directory_index'])
except TemplateDoesNotExist:
t = Template(DEFAULT_DIRECTORY_INDEX_TEMPLATE, name='Default directory index template')
files = []