0 points

media files in django


PHOTO EMBED

Mon Dec 21 2020 15:53:21 GMT+0000 (UTC)

Saved by @lewiseman #python

//settings.py

MEDIA_ROOT = Path(BASE_DIR, 'media/')

//main urls.py

from django.conf import settings
from django.conf.urls.static import static

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
content_copyCOPY