Static and media files

Static files and Media files is another common issue that newcomers to Django often struggle with, be it the concepts themselves, the settings configuration and how to manage them in deployed environment. Today, let's just focus on the concepts.

Static files are typically files to do with rendering the frontend of the site, be it images, favicons, CSS or Javascript files. As a developer you want to commit them to the repository either at a the project level or within each Django app. They only change at during development and updated in production during a release.

Media files are user generated files. Users include administrators, staff or end-users of the site. The are more typically images, documents or other data files. They do not exist within the repository and are entirely optional if your site doesn't require user-generated files. They can only be changed once a site is running and do not tend to replicate between environments.

Tomorrow we will look at what a settings file should look like for static files