我有:
在
INSTALLED_APPS
:INSTALLED_APPS = (
'grappelli',
'filebrowser',
'django.contrib.admin',
在
urlpatterns
:from filebrowser.sites import site
urlpatterns = patterns[
url(r'^admin/filebrowser/', include(site.urls)),
url(r'^grappelli/', include('grappelli.urls')),
url(r'^tinymce/', include('tinymce.urls')),
url(r'^admin/', include(admin.site.urls)),
]
这似乎工作正常。
我的
MEDIA_ROOT
设置为 'D:\\sites\\my_site\\public_html\\media\\'
.我有
FILEBROWSER_DIRECTORY = 'D:\\sites\\my_site\\public_html\\media\\'
也在我的设置中设置,但浏览时仍然出错 http://localhost:8000/admin/filebrowser/browse/
:ImproperlyConfigured at /admin/filebrowser/browse/
Error finding Upload-Folder (site.storage.location + site.directory). Maybe it does not exist?
最佳答案
事情是DIRECTORY
在 filebrowser.settings 中默认设置为 uploads/
.所以就做了
FILEBROWSER_DIRECTORY = ''
DIRECTORY = ''
在我的设置中,现在它使用
MEDIA_ROOT
工作因为我正在expexting。或者一个就可以创建
uploads
目录内 MEDIA_ROOT
使其工作。
关于django 文件浏览器 'Error finding Upload-Folder',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41652458/