This application allows you easily save media and static files into Selectel cloud storage.
- requests library
- selectel-api by Kirill Goldshtein
- Install the package
pip install django-selectel-storage
- Add to your settings module:
DEFAULT_FILE_STORAGE = 'django_selectel_storage.storage.SelectelStorage'
SELECTEL_USERNAME = 'xxxxxx'
SELECTEL_PASSWORD = 'container_password'
SELECTEL_CONTAINER_NAME = 'container_name'
If you have assigned custom domain with your selectel container, you need add the SELECTEL_CONTAINER_NAME attribute (trailing slash not matters)
SELECTEL_CONTAINER_URL = 'http://your.domain/'
- In python 3.x
ContentFile
with text mode content (not binary one) will causesTypeError
duerequests
restrictions