As it stands my STATIC files are served without issue using the configuration below.
In my settings.py:
MEDIA_ROOT = '/home/chronic88/webapps/media_media/'
MEDIA_URL = '/media/'
STATIC_ROOT = '/home/chronic88/webapps/static_media/'
STATIC_URL = '/static/'
static_media
and media_media
are both applications served by apache.
I can upload files via the admin and they show up inside the folder media_media
, but they won't display on their pages. When I check the file paths in the page source they seem correct mydomain.com/media/image.png
but they simply won't display. So, it seems the link is there but there is some problem communicating between apache and django that I can't put my finger on.
And my main urls.py:
admin.autodiscover()
urlpatterns = patterns('',
url(r'^', include('polls.urls', namespace="polls")),
url(r'^admin/', include(admin.site.urls)),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
This is the urls.py I'm using in prodution that works. I tried it without the last line in production but it gives the same result (files are uploaded but not displayable).
What am I missing?