Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.0.X] Fixed #9754: static-serving view now uses correct template na…

…me for directory indexes. Was [9566] in trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9567 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c1ec41a91ab2ad03bed53f0e52f6bf88e707bc93 1 parent c667fdd
James Bennett authored December 04, 2008

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  django/views/static.py
5  django/views/static.py
@@ -28,7 +28,7 @@ def serve(request, path, document_root=None, show_indexes=False):
28 28
     also set ``show_indexes`` to ``True`` if you'd like to serve a basic index
29 29
     of the directory.  This index view will use the template hardcoded below,
30 30
     but if you'd like to override it, you can create a template called
31  
-    ``static/directory_index``.
  31
+    ``static/directory_index.html``.
32 32
     """
33 33
 
34 34
     # Clean up given path to only allow serving files below document_root.
@@ -91,7 +91,8 @@ def serve(request, path, document_root=None, show_indexes=False):
91 91
 
92 92
 def directory_index(path, fullpath):
93 93
     try:
94  
-        t = loader.get_template('static/directory_index')
  94
+        t = loader.get_template('static/directory_index.html
  95
+        ')
95 96
     except TemplateDoesNotExist:
96 97
         t = Template(DEFAULT_DIRECTORY_INDEX_TEMPLATE, name='Default directory index template')
97 98
     files = []

0 notes on commit c1ec41a

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