Skip to content

debugtitan/django-git-storage

Repository files navigation

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'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages