Browse files

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.
  • Loading branch information...
1 parent 91d06ea commit ffc8e2e0ae9f1e35f4b7c78e6235bd0e3ba41aa9 @jphalip jphalip committed Mar 30, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 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

0 comments on commit ffc8e2e

Please sign in to comment.