Author: ubernostrum
Date: 2008-12-04 13:33:28 -0600 (Thu, 04 Dec 2008)
New Revision: 9566
Modified:
django/trunk/django/views/static.py
Log:
Fixed #9754: static-serving view now uses correct template name for directory
indexes.
Modified: django/trunk/django/views/static.py
===================================================================
--- django/trunk/django/views/static.py 2008-12-04 05:39:50 UTC (rev 9565)
+++ django/trunk/django/views/static.py 2008-12-04 19:33:28 UTC (rev 9566)
@@ -28,7 +28,7 @@
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 directory_index(path, fullpath):
try:
- 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 = []
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---