Skip to main content

Django Storage System for WebDAV

Project description

Django Storage System for WebDAV

Django Storage System for WebDAV is a storage system for Django that allows the user to use a WebDAV server as file storage for media files and also static files.

This work is licensed under the 3-clause BSD license, for more information see LICENSE.txt

Prerequisites

Django v2.2 and Python v3.5 (or higher)

Building and installing from source

To install the module in the current virtual environment.

python3 setup.py clean --all install

To instead install in your home directory.

python3 setup.py clean --all install --user

Configuration Settings

Following parameters are used by the generic file storage system to connect and authenticate against the WebDAV server.

STORAGE_WEBDAV_URL = "https://www.example.org/media/"
STORAGE_WEBDAV_USERNAME = "username"
STORAGE_WEBDAV_PASSWORD = "password123"

To enable the storage system, see Managing files in the Django documentation.

In short; the actual configuration for the generic file storage is DEFAULT_FILE_STORAGE, i.e.

DEFAULT_FILE_STORAGE = "django_storage_webdav.WebDavStorage"

To use the storage system for static files, use the following parameters.

STATIC_STORAGE_WEBDAV_URL="https://www.example.org/static/"
STATIC_STORAGE_WEBDAV_USERNAME="username"
STATIC_STORAGE_WEBDAV_PASSWORD="password123"

And then activate the storage system by setting the STATICFILES_STORAGE parameter.

STATICFILES_STORAGE = "django_storage_webdav.StaticWebDavStorage"

Installation in local package index (e.g. DevPi)

The commands below builds and install the artifacts in a local package index (DevPi) at http://devpi.myserver.lan/ under the staging index.

python3 setup.py clean --all sdist bdist_wheel
python3 -m pip install --upgrade twine
python3 -m twine register --verbose --repository staging dist/*tar.gz
python3 -m twine upload --repository-url http://devpi.myserver.lan/ --repository staging dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-storage-webdav-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

django_storage_webdav-0.1.2-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-storage-webdav-0.1.2.tar.gz.

File metadata

  • Download URL: django-storage-webdav-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for django-storage-webdav-0.1.2.tar.gz
Algorithm Hash digest
SHA256 11fdce601e50e62f9455e069ca08f3064e5c1cc0d25b1d4e98234b186689bccf
MD5 5b895e9ef6dd2aef43a24f5c9d114c12
BLAKE2b-256 ed964d23b3a016e3b2b52f0f812ad521dafd53a4c11971e5e1262038bc65794b

See more details on using hashes here.

File details

Details for the file django_storage_webdav-0.1.2-py2.py3-none-any.whl.

File metadata

  • Download URL: django_storage_webdav-0.1.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for django_storage_webdav-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 307a83fa428a7b4b95920fd95f4b6f0d314cb706cbc91621949802cc620b00bd
MD5 4d0a060faf9fe127a09ac5fa544f7792
BLAKE2b-256 fb5424aad856e37ef08b3637badb18b6978d133d49b8f24d8ebbfeb1947db311

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page