#20973 closed Cleanup/optimization (fixed)
Improve docs about handling static files without django.contrib.staticfiles.
Reported by: | loic84 | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Following discussion on IRC with @apollo13 and @ubernostrum.
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
Change History (4)
comment:1 by , 11 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 11 years ago
Has patch: | set |
---|
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
PR