I'm trying to run a jango site, static files are working, media is not loaded from the media folder, if the picture in static files is visible. The folder is listed correctly, pycharm gives a fall in the folder
setings.py
STATIC_ROOT = '/home/static/'
STATIC_URL = '/static/'
# MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
MEDIA_ROOT = '/home/media/'
MEDIA_URL = '/media/'
urls.py
if settings.DEBUG:
import debug_toolbar
# Server statics and uploaded media
urlpatterns += static(settings.MEDIA_URL,
document_root=settings.MEDIA_ROOT)
# Allow error pages to be tested
urlpatterns += [
url(r'^403$', handler403),
url(r'^404$', handler404),
url(r'^500$', handler500),
url(r'^__debug__/', include(debug_toolbar.urls)),
]
I use django oscar, this can be the cause of the problem?