Django: DefaultStorageFinder doesnt have a valid location

 Django配置STATICFILES_FINDERS使用'django.contrib.staticfiles.finders.DefaultStorageFinder'時報錯

ImproperlyConfigured: The storage backend of the staticfiles finder <class 'django.contrib.staticfiles.finders.DefaultStorageFinder'> doesn't have a valid location.

解決方案:

1.  不使用'django.contrib.staticfiles.finders.DefaultStorageFinder', 即刪除它

2. 配置MEDIA_ROOT爲合適路徑

 

參考: https://stackoverflow.com/questions/18089258/django-improperlyconfigured-the-storage-backend-of-the-staticfiles-finder-does

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章