mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #20973 -- Document serving static files without django.contrib.staticfiles
This commit is contained in:
parent
dd656073ad
commit
7b04038a7f
3 changed files with 61 additions and 13 deletions
|
@ -1448,6 +1448,14 @@ Example: ``"/var/www/example.com/media/"``
|
|||
|
||||
See also :setting:`MEDIA_URL`.
|
||||
|
||||
.. warning::
|
||||
|
||||
:setting:`MEDIA_ROOT` and :setting:`STATIC_ROOT` must have different
|
||||
values. Before :setting:`STATIC_ROOT` was introduced, it was common to
|
||||
rely or fallback on :setting:`MEDIA_ROOT` to also serve static files;
|
||||
however, since this can have serious security implications, there is a
|
||||
validation check to prevent it.
|
||||
|
||||
.. setting:: MEDIA_URL
|
||||
|
||||
MEDIA_URL
|
||||
|
@ -1461,6 +1469,11 @@ to a non-empty value.
|
|||
|
||||
Example: ``"http://media.example.com/"``
|
||||
|
||||
.. warning::
|
||||
|
||||
:setting:`MEDIA_URL` and :setting:`STATIC_URL` must have different
|
||||
values. See :setting:`MEDIA_ROOT` for more details.
|
||||
|
||||
.. setting:: MIDDLEWARE_CLASSES
|
||||
|
||||
MIDDLEWARE_CLASSES
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue