I trying to serve media files to the template but make them inaccessible from url,
and the opposite is happening
when i do: http://localhost:8000/media/210000002A.tif
I get prompted to download the files so it is being served when accessing from the address bar
but in the template I have:
<img src="{{ MEDIA_URL }}210000002A.tif"/>
and it is not working
my dir contains
-project
-app
-media
-static
-template
and i have this is my urls.py
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
and this in my settings.py
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR,'media')