How Django static files work in production
Published in
Dec 9, 2020
If you have trouble understanding STATIC_ROOT
, STATIC_URL
, collectstatic
, and the web server’s configuration, it’s because some things are better said with pictures than with text. Here are the pictures. If you want them in PDF format, you can get them at the end of the post. Media files work similar, except that there is no collectstatic
; Django saves them directly in MEDIA_ROOT
and the web server serves them from there.
This is a republication of an old article first published in my Django Deployment site.