Fixed #20819 -- Return 404 instead of 500 error when `staticfiles` view is used in production.

This commit is contained in:
Tai Lee 2013-07-31 17:11:49 +10:00
parent 5154c9f92c
commit 4c6ffcf721
4 changed files with 16 additions and 6 deletions

View file

@ -350,6 +350,12 @@ This view function serves static files in development.
**insecure**. This is only intended for local development, and should
**never be used in production**.
.. versionchanged:: 1.7
Will now raise an :exc:`~django.http.Http404` exception instead of
:exc:`~from django.core.exceptions.ImproperlyConfigured` when
:setting:`DEBUG` is ``True``.
.. note::
To guess the served files' content types, this view relies on the