Fixes #20162 -- Added a note in the documentation for `static.serve()` about the need for updating the system's map files when incorrect content types are returned. Many thanks to Simon Charette and Claude Paroz for their feedback.

This commit is contained in:
Julien Phalip 2013-03-30 16:23:27 -07:00
parent 91d06ea719
commit ffc8e2e0ae
1 changed files with 10 additions and 0 deletions

View File

@ -350,6 +350,16 @@ This view function serves static files in development.
**insecure**. This is only intended for local development, and should
**never be used in production**.
.. note::
To guess the served files' content types, this view relies on the
:py:mod:`mimetypes` module from the Python standard library, which itself
relies on the underlying platform's map files. If you find that this view
doesn't return proper content types for certain files, it is most likely
that the platform's map files need to be updated. This can be achieved, for
example, by installing or updating the ``mailcap`` package on a Red Hat
distribution, or ``mime-support`` on a Debian distribution.
This view is automatically enabled by :djadmin:`runserver` (with a
:setting:`DEBUG` setting set to ``True``). To use the view with a different
local development server, add the following snippet to the end of your