Skip to content

HFDS interface utilities of Django including file storage.

License

Notifications You must be signed in to change notification settings

thanos/django-hdfs

Repository files navigation

django-hdfs

https://badge.fury.io/py/django-hdfs.png https://travis-ci.org/thanos/django-hdfs.png?branch=master

HFDS interafce utilities of Django including file storage.

Documentation

The full documentation is at https://django-hdfs.readthedocs.org.

Features

  • Store all your uploaded media in HDFS

Quickstart

Install django-hdfs:

pip install git+https://github.com/thanos/django-hdfs.git

Add storages to your settings.py file:

INSTALLED_APPS = (
    ...
    'django_hdfs',
    ...
)

while you are at it set your configurations in the settings.py file:

HDFS_STROAGE = {
    'hosts': 'http://somehost:50070',
    'root': 'your_media'
}

Also set up the media constants:

MEDIA_ROOT = os.path.join(BASE_DIR, 'UPLOADS')
MEDIA_URL = '/media/'

Then use it in a project:

from django_hdfs.storage import HDFSStorage

# then use it in for FileField
some_doc = models.FileField('Upload Some Doc', null=True, blank=True, storage=HDFSStorage(),
                                   upload_to='some/path')

About

HFDS interface utilities of Django including file storage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published