from django.urls import path, re_pathfrom django.conf import settingsfrom django.views.static import serve
re_path(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),