1#in base url
2from django.conf import settings
3from django.conf.urls.static import static
4
5urlpatterns = [
6 # ... the rest of your URLconf goes here ...
7] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
8#in setting
9MEDIA_ROOT = BASE_DIR / 'media'
10MEDIA_URL = '/media/'