Metadata-Version: 2.1
Name: django-storage-webdav
Version: 0.1.2
Summary: Django Storage System for WebDAV
Home-page: https://gitlab.com/apalsson/django-webdav-storage
Author: A. Palsson
Author-email: contact@apalsson.info
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django :: 2.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Requires-Dist: django (>=2.2)
Requires-Dist: lxml
Requires-Dist: python-dateutil
Requires-Dist: requests

## 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](https://docs.djangoproject.com/en/2.2/topics/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/*


