setting文件中 if DEBUG 设置的参数都是在开发环境下的 static参数 url中的写法是这样
if settings.DEBUG:
urlpatterns += static (settings.STATIC_URL,
document_root = settings.STATIC_ROOT)
urlpatterns += static (settings.MEDIA_URL,
document_root = settings.MEDIA_ROOT)
相关下载链接:
//download.csdn.net/download/hevinbin/7899041?utm_source=bbsseo