In Django 1.8, I can upload images and they are saved on the path that they should, but when I add the path to template, the images are not displaying. I GET 200 http code for them in terminal server.
Here are the relevant parts in settings.py:
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
MEDIA_ROOT = os.path.join(BASE_DIR,'media')
MEDIA_URL = '/media/'
And in urls.py I have added:
urlpatterns = [
...
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example image tag path:
<img src="/media/photos/1/1430598029_08_ranaplazaslide.jpg" />
and the Get code:
GET /media/photos/1/1430598029_08_ranaplazaslide.jpg HTTP/1.1" 200 20888
I am wondering what is wrong with my settings and how to fix this?