summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorJulien Phalip <jphalip@gmail.com>2013-03-30 16:23:27 -0700
committerJulien Phalip <jphalip@gmail.com>2013-03-30 16:23:27 -0700
commitffc8e2e0ae9f1e35f4b7c78e6235bd0e3ba41aa9 (patch)
treed16cfdee1cea00d10513e070b3737a9857c1f104 /docs/ref
parent91d06ea719f505e1e223d5ea058a837e4d2c613a (diff)
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.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/staticfiles.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/ref/contrib/staticfiles.txt b/docs/ref/contrib/staticfiles.txt
index b7de75baf1..806d135deb 100644
--- a/docs/ref/contrib/staticfiles.txt
+++ b/docs/ref/contrib/staticfiles.txt
@@ -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