mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #20819 -- Return 404 instead of 500 error when `staticfiles` view is used in production.
This commit is contained in:
@@ -122,6 +122,14 @@ Miscellaneous
|
||||
* Loading empty fixtures emits a ``RuntimeWarning`` rather than raising
|
||||
:class:`~django.core.management.CommandError`.
|
||||
|
||||
* :view:`~django.contrib.staticfiles.views.serve` will now raise an
|
||||
:exc:`~django.http.Http404` exception instead of
|
||||
:exc:`~from django.core.exceptions.ImproperlyConfigured` when :setting:`DEBUG`
|
||||
is ``True``. This change removes the need to conditionally add the view to
|
||||
your root URLconf, which in turn makes it safe to reverse by name. It also
|
||||
removes the ability for visitors to generate spurious HTTP 500 errors by
|
||||
requesting static files that don't exist or haven't been collected yet.
|
||||
|
||||
Features deprecated in 1.7
|
||||
==========================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user