Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19680 closed Uncategorized (wontfix)

"STATIC_ROOT" directory usage is unclear in "settings.py"

Reported by: retail79174@… Owned by: nobody
Component: Core (Management commands) Version: 1.4
Severity: Normal Keywords: settings collectstatic
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

In Django 1.3.4 at least, the default "settings.py" contains comments for the multitude of variables related to the handling of static files, but does not clarify their relationship (and help teach the newcomer about the command) by mentioning

manage.py collectstatic

Please change the comment on "STATIC_ROOT" to include text of the form:
Before starting your Django server, you must execute the command "manage.py collectstatic",
which will copy all the static files found into this directory. If you later change
the static files, you must re-execute that command.

Change History (4)

comment:1 by Aymeric Augustin, 12 years ago

Resolution: wontfix
Status: newclosed

Thanks for the suggestion, but every feature of Django cannot be documented in the settings file.

comment:2 by anonymous, 12 years ago

To a new Django programmer, the relationship of the 5-6 different settings related to serving static files is baffling -- it took me two hours to just get a static image to be served. One of the mysteries is why I set "STATIC_ROOT" if I'm not supposed to put anything in there. I am not asking for a feature to be documented -- I am asking for the role of a critical directory to be made clear.

comment:3 by anonymous, 12 years ago

Summary: Default "settings.py" does not mention the role of "collectstatic""STATIC_ROOT" directory usage is unclear in "settings.py"

Reopening only because there is no CC on this, and Mr. Augustin (whom I know is a major Django contributor, not some random troll) will not see my comments otherwise. But if it is reclosed, and I have no reason to expect that it won't be, I will not reopen this a second time, thanks.

comment:4 by Aymeric Augustin, 12 years ago

Your comments will be read: there's a mailing-list where every comment is notified, with ~1000 subscribers, including myself :)


By now I suppose you've read the basic usage guide for static files and you've figured out how it works.

You're far from being the first person to struggle with static files. That's mainly because the concept isn't trivial — it allows post processing and shipping static files in pluggable apps, which isn't possible with a standard serve-this-directory setup — but we can try to improve the situation with better docs. That's the topic of ticket #19582.

Note: See TracTickets for help on using tickets.
Back to Top