Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #9754: static-serving view now uses correct template name for d…

…irectory indexes.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 5d7c57f commit dfef20a7806073dab547eeb1c5e700c4bd0e1634 @ubernostrum ubernostrum committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/views/
4 django/views/
@@ -28,7 +28,7 @@ def serve(request, path, document_root=None, show_indexes=False):
also set ``show_indexes`` to ``True`` if you'd like to serve a basic index
of the directory. This index view will use the template hardcoded below,
but if you'd like to override it, you can create a template called
- ``static/directory_index``.
+ ``static/directory_index.html``.
# Clean up given path to only allow serving files below document_root.
@@ -91,7 +91,7 @@ def serve(request, path, document_root=None, show_indexes=False):
def directory_index(path, fullpath):
- t = loader.get_template('static/directory_index')
+ t = loader.get_template('static/directory_index.html')
except TemplateDoesNotExist:
t = Template(DEFAULT_DIRECTORY_INDEX_TEMPLATE, name='Default directory index template')
files = []

0 comments on commit dfef20a

Please sign in to comment.
Something went wrong with that request. Please try again.