Skip to main content

A WebDAV server for Django.

Project description

Production ready WebDav extension for Django.

Motivation

Django is a very popular tool which provides data representation and management. One of the key goals is to provide machine access to it. Most popular production ready tools provide json based api access. Which have their own advantages and disadvantages.

WebDav today is a standard for cooperative document management. Its clients are built in the modern operation systems and supported by the world popular services. But it very important to remember that it’s not only about file storage, WebDab provides a set of methods to deal with tree structured objects of any kind.

Providing WebDav access to Django resources opens new horizons for building Web2.0 apps, with inplace edition and providing native operation system access to the stored objects.

Difference with SmartFile django-webdav

Base resource functionality was separated into BaseResource class from the storage functionality which developers free to choose from provided or implement themselves.

Improved class dependencies. Resource class don’t know anything about url or server, its goal is only to store content and provide proper access.

Removed properties helper class. View is now responsible for xml generation, and resource provides actual property list.

Server is now inherited from Django Class Based View, and renamed to DavView.

Key methods covered with tests.

Removed redundant request handler.

Added FSResource and DBResource to provide file system and data base access.

Xml library usage is replaced with lxml to achieve proper xml generation code readability.

How to create simple filesystem webdav resource

1. Create resource.py

from django.conf import settings
from djangodav.base.resource import MetaEtagMixIn
from djangodav.fs.resource import DummyFSDAVResource

class MyDavResource(MetaEtagMixIn, DummyFSDAVResource):
    root = '/path/to/folder'

2. Register WebDav view in urls.py

from djangodav.acl import FullAcl
from djangodav.lock import DummyLock
from djangodav.views import DavView

from django.conf.urls import patterns

from .resource import TempDirWebDavResource

urlpatterns = patterns('',
    (r'^fsdav(?P<path>.*)$', DavView.as_view(resource_class=MyDavResource, lock_class=DummyLock,
     acl_class=FullAcl)),
)

Project details


Release history Release notifications

History Node

0.0.1b23

History Node

0.0.1b22

History Node

0.0.1b21

History Node

0.0.1b20

History Node

0.0.1b19

History Node

0.0.1b18

History Node

0.0.1b17

History Node

0.0.1b16

History Node

0.0.1b15

History Node

0.0.1b14

History Node

0.0.1b13

History Node

0.0.1b12

History Node

0.0.1b11

History Node

0.0.1b10

History Node

0.0.1b9

History Node

0.0.1b8

History Node

0.0.1b7

History Node

0.0.1b6

History Node

0.0.1b5

History Node

0.0.1b4

This version
History Node

0.0.1b3

History Node

0.0.1b2

History Node

0.0.1b1

History Node

0.0.1b0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
DjangoDav-0.0.1b3.tar.gz (22.9 kB) Copy SHA256 hash SHA256 Source None May 22, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page