Author: ubernostrum
Date: 2008-12-04 13:34:23 -0600 (Thu, 04 Dec 2008)
New Revision: 9567
Modified:
django/branches/releases/1.0.X/django/views/static.py
Log:
[1.0.X] Fixed #9754: static-serving view now uses correct template name for
directory indexes. Was [9566] in trunk.
Modified: django/branches/releases/1.0.X/django/views/static.py
===================================================================
--- django/branches/releases/1.0.X/django/views/static.py 2008-12-04
19:33:28 UTC (rev 9566)
+++ django/branches/releases/1.0.X/django/views/static.py 2008-12-04
19:34:23 UTC (rev 9567)
@@ -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,8 @@
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
-~----------~----~----~----~------~----~------~--~---