You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 inpublic_collected
which is served by WhitenoiseMEDIA_ROOT
not served whenDEBUG=False
#60The text was updated successfully, but these errors were encountered: