Skip to content

django-filebrowser #
Find similar titles

Structured data

Category
Etc
Programming
Database

Django Filebrowser #

Overview #

Django is big framework. It has very useful features, such as, built-in administration, database migration, site management, content type management and others. Some Django projects may need to have file-manager for managing static files on server side. Unfortunately, Django does not provide file-manager for uploaded or statically served files by default. For this purpose, there had been several open-source projects to fulfill this empty place.

One of the actively developing open-source project is django-filebrowser. It has been developing by Patrick Kranzlmueller, who is the author of famous django-grapelli package. It is more decent and stable version among the other file-managers. It also has full documentation.

Features #

django-filebrowser has following features:

  • browse directories on your server and upload/delete/edit/rename files
  • include images/documents to your models/database using the FileBrowseField
  • select images/documents with TinyMCE

Requirements #

Installation #

  1. Intallation is super-easy with pip.

    $ pip install django-filebrowser
    
  2. Add the filebrowser to your INSTALLED_APPS (before django.contrib.admin):

    #!python
    INSTALLED_APPS = (
        'grappelli',
        'filebrowser',
        'django.contrib.admin',
    )
    
  3. Add the FileBrowser site to your url-patterns (before any admin-urls):

    #!python
    from filebrowser.sites import site
    
    urlpatterns = [
       url(r'^admin/filebrowser/', include(site.urls)),
       url(r'^grappelli/', include('grappelli.urls')),
       url(r'^admin/', include(admin.site.urls)),
    ]
    
  4. Collect the static files:

    $ python manage.py collectstatic --noinput
    

Settings #

You need to add a folder “uploads” within site.storage.location when using the default settings.

Testing #

Start the devserver and login to your admin site:

    python manage.py runserver <IP-address>:8000

Goto /admin/filebrowser/browse/ and check if everything works as expected.

References #

  1. https://github.com/sehmaschine/django-filebrowser
  2. https://django-filebrowser.readthedocs.io/en/latest/index.html

Suggested Pages #

0.0.1_20140628_0