This application allows you easily save media and static files into webdav storage
Project description
This application allows you easily save media and static files into webdav storage.
Dependencies
requests library
Installation
Install the package
pip install django-webdav-storage
Pick the webdav server url in WEBDAV_URL and WEBDAV_PUBLIC_URL:
WEBDAV_URL = 'http://webdav.example.com/',
WEBDAV_PUBLIC_URL = 'http://webdav.example.com/'
If you want use HTTP Basic authorization to webdav access, you can specify your credentials like that:
WEBDAV_URL = 'http://johndoe:secret@webdav.example.com/'
Set the webdav storage class as default:
DEFAULT_FILE_STORAGE = 'django_webdav_storage.storage.WebDavStorage'
WebDAV nginx example
server {
listen 80;
charset utf-8;
server_tokens off;
server_name webdav.example.com;
access_log /var/log/nginx/webdav_access.log;
error_log /var/log/nginx/webdav_error.log;
root /usr/share/nginx/webdav;
location / {
client_max_body_size 10m;
client_body_temp_path /tmp;
create_full_put_path on;
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_access user:rw group:r all:r;
satisfy any;
limit_except GET {
allow 127.0.0.1/32;
deny all;
auth_basic 'My WebDAV area';
auth_basic_user_file /usr/share/nginx/.htpasswd;
}
}
}
Caveats
In python 3.x ContentFile with text mode content (not binary one) will causes TypeError due requests restrictions
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
django-webdav-storage-0.3.zip
(9.9 kB
view hashes)
Built Distribution
Close
Hashes for django-webdav-storage-0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a714ea55e372a931bea9aa824857ff48697e080b9ddbbd36aa88273b72f83afa |
|
MD5 | c384a3453fcb28d77c63a5ab836b352d |
|
BLAKE2b-256 | 477e2eeb9b6e125f52f36fe12e19c41b4f5e02fd2ecab4f6e7da86cff688fef0 |
Close
Hashes for django-webdav-storage-0.3.tar.bz2
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4920b60849e3bfc33a22fd65a29429d0a64fb011075a28a968b019c7f1aabbc5 |
|
MD5 | a92564ac9f5f2fc958ce035e6775ad4c |
|
BLAKE2b-256 | 80a8d16a44e4d3e6a621f90ac0c30d379080ab0395b5133f4b19a16ce5249878 |
Close
Hashes for django_webdav_storage-0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f70c0894a77359f2ec48552436f5e9385d5c4282d7f24343c63ce569db1e97 |
|
MD5 | 7841b9802cc22fc23e3b53aa144aeb46 |
|
BLAKE2b-256 | 3c413976bd36c39a43cd3b38cbc2b24f2a2773fb9930d85b56847a8358535aff |