mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-16 21:55:37 -05:00
Merge branch 'dev' into celery-tasks
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from django.conf.urls import include, url
|
||||
from django.conf.urls import include
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.urls import path, re_path
|
||||
@@ -7,7 +7,6 @@ from django.views.generic import RedirectView
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from paperless.consumers import StatusConsumer
|
||||
from paperless.views import FaviconView
|
||||
from documents.views import (
|
||||
CorrespondentViewSet,
|
||||
DocumentViewSet,
|
||||
@@ -19,6 +18,7 @@ from documents.views import (
|
||||
SearchAutoCompleteView,
|
||||
StatisticsView
|
||||
)
|
||||
from paperless.views import FaviconView
|
||||
|
||||
api_router = DefaultRouter()
|
||||
api_router.register(r"correspondents", CorrespondentViewSet)
|
||||
@@ -31,32 +31,32 @@ api_router.register(r"tags", TagViewSet)
|
||||
urlpatterns = [
|
||||
|
||||
# API
|
||||
url(r"^api/auth/",include(('rest_framework.urls', 'rest_framework'), namespace="rest_framework")),
|
||||
url(r"^api/search/autocomplete/", SearchAutoCompleteView.as_view(), name="autocomplete"),
|
||||
url(r"^api/search/", SearchView.as_view(), name="search"),
|
||||
url(r"^api/statistics/", StatisticsView.as_view(), name="statistics"),
|
||||
url(r"^api/", include((api_router.urls, 'drf'), namespace="drf")),
|
||||
re_path(r"^api/auth/", include(('rest_framework.urls', 'rest_framework'), namespace="rest_framework")),
|
||||
re_path(r"^api/search/autocomplete/", SearchAutoCompleteView.as_view(), name="autocomplete"),
|
||||
re_path(r"^api/search/", SearchView.as_view(), name="search"),
|
||||
re_path(r"^api/statistics/", StatisticsView.as_view(), name="statistics"),
|
||||
re_path(r"^api/", include((api_router.urls, 'drf'), namespace="drf")),
|
||||
|
||||
# Favicon
|
||||
url(r"^favicon.ico$", FaviconView.as_view(), name="favicon"),
|
||||
re_path(r"^favicon.ico$", FaviconView.as_view(), name="favicon"),
|
||||
|
||||
# The Django admin
|
||||
url(r"admin/", admin.site.urls),
|
||||
re_path(r"admin/", admin.site.urls),
|
||||
|
||||
# These redirects are here to support clients that use the old FetchView.
|
||||
url(
|
||||
re_path(
|
||||
r"^fetch/doc/(?P<pk>\d+)$",
|
||||
RedirectView.as_view(url='/api/documents/%(pk)s/download/'),
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
r"^fetch/thumb/(?P<pk>\d+)$",
|
||||
RedirectView.as_view(url='/api/documents/%(pk)s/thumb/'),
|
||||
),
|
||||
url(
|
||||
re_path(
|
||||
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/'))),
|
||||
re_path(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/frontend/assets/%(path)s')),
|
||||
@@ -64,7 +64,7 @@ urlpatterns = [
|
||||
path('accounts/', include('django.contrib.auth.urls')),
|
||||
|
||||
# Root of the Frontent
|
||||
url(r".*", login_required(IndexView.as_view())),
|
||||
re_path(r".*", login_required(IndexView.as_view())),
|
||||
|
||||
]
|
||||
|
||||
@@ -74,8 +74,8 @@ websocket_urlpatterns = [
|
||||
]
|
||||
|
||||
# Text in each page's <h1> (and above login form).
|
||||
admin.site.site_header = 'Paperless'
|
||||
admin.site.site_header = 'Paperless-ng'
|
||||
# Text at the end of each page's <title>.
|
||||
admin.site.site_title = 'Paperless'
|
||||
admin.site.site_title = 'Paperless-ng'
|
||||
# Text at the top of the admin index page.
|
||||
admin.site.index_title = 'Paperless administration'
|
||||
admin.site.index_title = 'Paperless-ng administration'
|
||||
|
Reference in New Issue
Block a user