Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.11 KB

File metadata and controls

49 lines (31 loc) · 1.11 KB

django-git-storages

Django Github Storage is a Django package that facilitates integration with Github by implementing Django Storage API. With several lines of configuration, you can start using Github for yourfiles. It uses PyGithub package under the hood.

It is simple to contribute to implement:

Table of content

Requirements

The package requires Python 3.4+ and Django 3+.

Installation

To install the package, just run:

$ pip install django-git-storages

Settings

You need to add Github credentials to settings.py:

GIT_STORAGE = {
    'GIT_ACCESS_TOKEN': 'your_github_access_token',
    'GIT_REPO': 'username/repo',
}

Instead of putting credentials in settings.py, you can provide them as GITHUB_ACCESS_TOKEN, and GITHUB_REPO environment variables.

Fianlly add to settings.py:

DEFAULT_FILE_STORAGE = 'git_storage.storage.GithubStorage'