How Django static files work in production

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.

--

--

Antonis Christofides
Django Deployment

I help scientists and engineers bring their models to the web