A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
added backward compatibility URLs
Jonas Winkler87be49c03d2f
diff --git a/src/paperless/urls.py b/src/paperless/urls.pyindex 16169309b..43ba5eb49 100755--- a/src/paperless/urls.py+++ b/src/paperless/urls.py@@ -1,6 +1,7 @@from django.conf.urls import include, urlfrom django.contrib import adminfrom django.urls import path+from django.views.decorators.csrf import csrf_exemptfrom django.views.generic import RedirectViewfrom rest_framework.authtoken import viewsfrom rest_framework.routers import DefaultRouter@@ -41,6 +42,21 @@ urlpatterns = [# The Django adminurl(r"admin/", admin.site.urls),+ # These redirects are here to support clients that use the old FetchView.+ url(+ r"^fetch/doc/(?P<pk>\d+)$",+ RedirectView.as_view(url='/api/documents/%(pk)s/download/'),+ ),+ url(+ r"^fetch/thumb/(?P<pk>\d+)$",+ RedirectView.as_view(url='/api/documents/%(pk)s/thumb/'),+ ),+ url(+ r"^fetch/preview/(?P<pk>\d+)$",+ RedirectView.as_view(url='/api/documents/%(pk)s/preview/'),+ ),+ url(r"^push$", csrf_exempt(RedirectView.as_view(url='/api/documents/post_document/'))),+# Frontend assets TODO: this is pretty bad.path('assets/<path:path>', RedirectView.as_view(url='/static/assets/%(path)s')),