Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-filebrowser 'Error finding Upload-Folder'

I have:

  • Django 1.8.2
  • django-grappelli 2.7.3
  • django-filebrowser 3.6.4
  • django-tinymce 2.4.0

In INSTALLED_APPS:

INSTALLED_APPS = (
    'grappelli',
    'filebrowser',
    'django.contrib.admin',

In 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)),
]

Which seems to work correctly.

My MEDIA_ROOT is set to 'D:\\sites\\my_site\\public_html\\media\\'.

I have FILEBROWSER_DIRECTORY = 'D:\\sites\\my_site\\public_html\\media\\' set also in my settings, but still getting an error on browsing 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?
like image 889
jevgenij Avatar asked Jan 14 '17 16:01

jevgenij


Video Answer


1 Answers

The thing is DIRECTORY is set in filebrowser.settings by default to uploads/. So just did

FILEBROWSER_DIRECTORY = ''
DIRECTORY = ''

in my settings and now it works using MEDIA_ROOT as I was expexting.

Or one just can create uploads directory inside MEDIA_ROOT to make it work.

like image 61
jevgenij Avatar answered Sep 21 '22 12:09

jevgenij