Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9754 closed (fixed)

Documentation for overriding static directory-listing template incorrect

Reported by: rnm@… 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

The documentation at http://docs.djangoproject.com/en/dev/howto/static-files/ says to use a template called "static/directory_index.html" to override the default template for directory listings. This doesn't work, however. Inspection of the code in /django/views/static.py indicates the template should be called "static/directory_index", which does work.

Change History (3)

comment:1 Changed 7 years ago by ubernostrum

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

(In [9566]) Fixed #9754: static-serving view now uses correct template name for directory indexes.

comment:2 Changed 7 years ago by ubernostrum

(In [9567]) [1.0.X] Fixed #9754: static-serving view now uses correct template name for directory indexes. Was [9566] in trunk.

comment:3 Changed 7 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

This wasn't actually a documentation bug; once upon a time the template loader would treat 'static/directory_index' as 'static/directory_index.html', and apparently this code was not updated when the loader was tightened up to require the file extension.

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