diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-01-09 12:41:07 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2009-01-09 12:41:07 +0000 |
| commit | d32c2908464465d6eda5e69da95a1c6269031def (patch) | |
| tree | 39f34245b894f80983eb67dee4de90aa1ae10c98 /docs | |
| parent | 0e59fbbd8591c12c7f156a8bea2905c4e44202c5 (diff) | |
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.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/howto/static-files.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/howto/static-files.txt b/docs/howto/static-files.txt index b0b76bd78b..bff472fc3f 100644 --- a/docs/howto/static-files.txt +++ b/docs/howto/static-files.txt @@ -90,7 +90,7 @@ You can customize the index view by creating a template called * ``directory`` -- the directory name (a string) * ``file_list`` -- a list of file names (as strings) in the directory -Here's the default ``static/directory_index`` template: +Here's the default ``static/directory_index.html`` template: .. code-block:: html+django @@ -112,6 +112,14 @@ Here's the default ``static/directory_index`` template: </body> </html> +.. versionchanged:: 1.0.3 + Prior to Django 1.0.3, there was a bug in the view that provided directory + listings. The template that was loaded had to be called + ``static/directory_listing`` (with no ``.html`` extension). For backwards + compatibility with earlier versions, Django will still load templates with + the older (no extension) name, but it will prefer a the + ``directory_index.html`` version. + Limiting use to DEBUG=True ========================== |
