Since `django.contrib.staticfiles` is optional, we should document how to
serve `STATIC_URL` without it during development; the docs for serving
`MEDIA_URL` [ 1 ] may be used as a template.
Some parts of the docs need to be reviewed; for example "Note that the
Django development server automatically serves the static files of the
admin app (and any other installed apps)" [ 2 ] is actually only true if
`django.contrib.staticfiles` is installed.
It might be helpful to warn that `MEDIA_URL` and `STATIC_URL` must have
different values, the same applies to `MEDIA_ROOT` and `STATIC_ROOT`. This
is mostly an issue because historically (pre-contrib.staticfiles) a lot of
projects were using `MEDIA_ROOT`/`MEDIA_URL` to serve static files.
[ 1 ] https://docs.djangoproject.com/en/dev/howto/static-files/#serving-
files-uploaded-by-a-user
[ 2 ] https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi
/#serving-the-admin-files
--
Ticket URL: <https://code.djangoproject.com/ticket/20973>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* easy: 1 => 0
* needs_docs: => 0
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/20973#comment:1>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/1538 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/20973#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"7b04038a7f4b291bc05124c4b5300001dc94e13f"]:
{{{
#!CommitTicketReference repository=""
revision="7b04038a7f4b291bc05124c4b5300001dc94e13f"
Fixed #20973 -- Document serving static files without
django.contrib.staticfiles
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20973#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"a62b640f7d3a0b90c4009cc7efe0a19fd3ad0bfa"]:
{{{
#!CommitTicketReference repository=""
revision="a62b640f7d3a0b90c4009cc7efe0a19fd3ad0bfa"
[1.6.x] Fixed #20973 -- Document serving static files without
django.contrib.staticfiles
Backport of 7b04038a7f from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/20973#comment:4>