-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
MEDIA_ROOT should only be added to URLs when DEBUG=True. However, as this is a demo - we wanted Django to serve these assets. We should configure MEDIA_ROOT to serve files through a web server. Media is used to serve protected content such as uploaded PDFS, which might not want to live in public_collected which is served by Whitenoise
In a production situation you will want your media to be served from your front end web server (Apache, Nginx or the like) to avoid extra load on the Django/Python process. The MEDIA_URL and MEDIA_ROOT are usually used for this.