Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#9993 closed (fixed)

"directory_index.html" does not work

Reported by: Gurur Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

http://docs.djangoproject.com/en/dev/howto/static-files/#howto-static-files

There is instruction: "You can customize the index view by creating a template called static/directory_index.html."

It should be: "You can customize the index view by creating a template called static/directory_index."

At least that's how it works with me.

Change History (4)

comment:1 by Gurur, 16 years ago

Component: UncategorizedDocumentation

comment:2 by Malcolm Tredinnick, 16 years ago

This was actually a bug in the code (it used to automatically append the .html, but that was changed a while back and the static loader wasn't updated). We have fixed it in the code base now (see ticket #9754 and commits r9566 and r9567). The fix will be in Django 1.0.3.

I'll add a note to the documentation to reflect the bug, however.

comment:3 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [9725]) Revised r9566 slightly to be backwards compatible with versions 1.0 - 1.0.2.

Also documented the change. We prefer to load directory_index.html for static
directory listings, but if you have the (older style) "directory_index"
template and no .html version, we'll load that. This should stop a bunch of
mysterious breakages when people upgrade to Django 1.0.3 or Django 1.1. Also
keeps the docs in sync with released code.

Fixed #9993.

comment:4 by Malcolm Tredinnick, 16 years ago

(In [9726]) [1.0.X] Revised r9567 slightly to be backwards compatible with versions 1.0 - 1.0.2.

Also documented the change. We prefer to load directory_index.html for static
directory listings, but if you have the (older style) "directory_index"
template and no .html version, we'll load that. This should stop a bunch of
mysterious breakages when people upgrade to Django 1.0.3 or Django 1.1. Also
keeps the docs in sync with released code.

Fixed #9993.

Backport of r9725 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top