[Django] #20973: Improve docs about handling static files without django.contrib.staticfiles.

5 views
Skip to first unread message

Django

unread,
Aug 26, 2013, 4:42:30 AM8/26/13
to django-...@googlegroups.com
#20973: Improve docs about handling static files without
django.contrib.staticfiles.
-------------------------------+--------------------
Reporter: loic84 | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/20973>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 27, 2013, 9:08:30 AM8/27/13
to django-...@googlegroups.com
#20973: Improve docs about handling static files without
django.contrib.staticfiles.
--------------------------------------+------------------------------------
Reporter: loic84 | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* 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>

Django

unread,
Sep 1, 2013, 3:58:17 PM9/1/13
to django-...@googlegroups.com
#20973: Improve docs about handling static files without
django.contrib.staticfiles.
--------------------------------------+------------------------------------
Reporter: loic84 | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/1538 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/20973#comment:2>

Django

unread,
Sep 3, 2013, 8:59:55 AM9/3/13
to django-...@googlegroups.com
#20973: Improve docs about handling static files without
django.contrib.staticfiles.
--------------------------------------+------------------------------------
Reporter: loic84 | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Django

unread,
Sep 3, 2013, 9:02:04 AM9/3/13
to django-...@googlegroups.com
#20973: Improve docs about handling static files without
django.contrib.staticfiles.
--------------------------------------+------------------------------------
Reporter: loic84 | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages