Opened 7 years ago

Closed 7 years ago

Last modified 7 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: UI/UX:

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 Changed 7 years ago by Gurur

  • Component changed from Uncategorized to Documentation
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by mtredinnick

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 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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 Changed 7 years ago by mtredinnick

(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