2016-11-21

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.

how-django-static-files-work-nginx

how-django-static-files-work-apache


Want these drawings in PDF?

Enter your name and email address and you will receive them instantly.