Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#19680 closed Uncategorized (wontfix)

"STATIC_ROOT" directory usage is unclear in ""

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


In Django 1.3.4 at least, the default "" 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 collectstatic

Please change the comment on "STATIC_ROOT" to include text of the form:
Before starting your Django server, you must execute the command " 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 Changed 3 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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

comment:2 Changed 3 years ago by anonymous

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 Changed 3 years ago by anonymous

  • Summary changed from Default "" does not mention the role of "collectstatic" to "STATIC_ROOT" directory usage is unclear in ""

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 Changed 3 years ago by aaugustin

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