Now this was working smoothly in dev, but I keep getting the Error 404 in my apache2 prod machine while uploading images from the Django admin page.
I see the images get added to my /media/images/ folder from the admin upload, but it fails to load on the website.
Is this a permission issue?
This is my folder structure within /var/www/:
app
|_app
|_media
|_images
|_file.png
|_static
This is my settings.py specification for media:
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media').replace('\\','/')
This is my urls.py specification:
urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + [..]
(Note: Please request further info in the comments, will keep adding on as-need basis)
Aucun commentaire:
Enregistrer un commentaire