Skip to content

omni-digital/django-media-guard

Repository files navigation

django-media-guard

Serve private media through a Django application.

Requirements

  • Python >= 3.6
  • Django >= 1.11, < 2.2

Installation

  pip install --upgade pip
  pipenv install --dev

To be able to upload to pypi you need a .pypirc file, this can live in your home directory. Example:

[distutils]
index-servers =
    sfd

[sfd]
repository: https://pypi.test.squirrel.rodeo/
username: [********]
password: [********]

Usage

To deploy to omni pypi

  • Install twine
pip install twine
  • Create a distribution
python setup.py sdist
  • Use twine to push to omni pypi
twine upload -r sfd dist/*

Development

pipenv install --dev
pre-commit install --hook-type pre-commit
pre-commit install --hook-type pre-push

pipenv shell

You can run the example application using the manage.py in the repo root.