Introduction
Media files refer to extra files that can be added after deployment to enrich your Django application. Usually, they are extra images that you would use in your site, but any type of file (including video, audio, PDF, text, documents, or even HTML) can be served as media.
You can think of them as somewhere between dynamic data and static assets. They are not dynamic data that Django generates on the fly, like when rendering a template. They also are not the static files that are included by the site developer when the site is deployed. Instead, they are extra files that can be uploaded by users or generated by your application for later retrieval.
Some common examples of media files (that you will see in Activity 8.01, Image and PDF Uploads of Books, later in this chapter) are book covers and preview PDFs that can be attached to a Book
object. You can also use media files to allow users to upload images for a blog post or avatars for a social media site. If you wanted...