when i upload image on django filer, that image is in media directory, but i get file missing
message on admin..
Image:
settings.py:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'myproject/static/')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'myproject/public'),
)
MEDIA_ROOT = os.path.join(BASE_DIR, 'myproject/media/')
MEDIA_URL = '/media/'
urls.py:
...
if settings.DEBUG:
# static files (images, css, javascript, etc.)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
How can i fix this?