Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#16633 closed Cleanup/optimization (invalid)

Static files in 1.3

Reported by: from_a_far@… Owned by: nobody
Component: Documentation Version: 1.3
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


Just noticed the following in 1.3.

(correct me if I'm wrong) But it seems that if you want to use static files in a vanilla install you have to do one of the following: 1. Have a line in to point to your static files (link) 2. Put SATIC_ROOT in STATICFILES_DIRS (link)

Is there any chance that one of the above can be set as a default or that the docs can reflect this?

BTW just like to commend the document keeps for describing (what could be construed as complex) 'collectstatic' in a succinct way. I was able to follow this change between version without trouble. Thank you.

Change History (2)

comment:1 Changed 7 years ago by Jannis Leidel

Resolution: invalid
Status: newclosed

No, you don't have to put the line to your if you use the runserver command since the command can automatically serve the files.

Adding STATIC_ROOT to STATICFILES_DIRS isn't needed at all, too. In fact it's a bug to do so since it's the "absolute path to the directory where collectstatic will collect static files for deployment." staticfiles will use all directories in STATICFILES_DIRS as the source for files to collect in STATIC_ROOT.

comment:2 Changed 7 years ago by anonymous

Sorry just read that doing this is VERY VERY BAD because of the collectstatic command.

May I instead make a request the a link to the following be made in the reference to STATIC_ROOT and STATIC_URL so that people can get up and running in a development environment without having to hunt through the docs

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