mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 00:57:09 +01:00
Initial support for WebDAV. Lots of stuff is not there yet and most of the stuff which is there is not really tested. But it kind of already works.
This commit is contained in:
parent
8f6231bd34
commit
a53e30e0a5
4 changed files with 275 additions and 1 deletions
|
|
@ -6,6 +6,9 @@ from django.views.decorators.csrf import csrf_exempt
|
|||
from django.views.generic import RedirectView
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from djangodav.acls import FullAcl
|
||||
from djangodav.locks import DummyLock
|
||||
|
||||
from documents.views import (
|
||||
CorrespondentViewSet,
|
||||
DocumentViewSet,
|
||||
|
|
@ -14,6 +17,7 @@ from documents.views import (
|
|||
PushView,
|
||||
TagViewSet
|
||||
)
|
||||
from paperless.dav import PaperlessDavResource, SecuredDavView
|
||||
from reminders.views import ReminderViewSet
|
||||
|
||||
router = DefaultRouter()
|
||||
|
|
@ -46,6 +50,8 @@ urlpatterns = [
|
|||
# The Django admin
|
||||
url(r"admin/", admin.site.urls),
|
||||
|
||||
url(r'^dav(?P<path>.*)$', SecuredDavView.as_view(resource_class=PaperlessDavResource, lock_class=DummyLock, acl_class=FullAcl)),
|
||||
|
||||
# Redirect / to /admin
|
||||
url(r"^$", RedirectView.as_view(
|
||||
permanent=True, url=reverse_lazy("admin:index"))),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue