From 03bd2b73284ca602bcfb9f294437b419cc94c5fe Mon Sep 17 00:00:00 2001 From: Jonas Winkler Date: Thu, 29 Oct 2020 00:36:39 +0100 Subject: [PATCH] small fixes --- src/paperless/settings.py | 3 +++ src/paperless/urls.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/paperless/settings.py b/src/paperless/settings.py index edd452e1a..a178fb6e1 100644 --- a/src/paperless/settings.py +++ b/src/paperless/settings.py @@ -103,6 +103,9 @@ def __get_boolean(key, default="NO"): 'rest_framework.authentication.BasicAuthentication', 'rest_framework.authentication.TokenAuthentication', 'paperless.auth.QueryTokenAuthentication' + ], + 'DEFAULT_PERMISSION_CLASSES': [ + 'rest_framework.permissions.IsAuthenticated', ] } diff --git a/src/paperless/urls.py b/src/paperless/urls.py index 07c9a96ed..b78cdc1ff 100755 --- a/src/paperless/urls.py +++ b/src/paperless/urls.py @@ -1,5 +1,7 @@ from django.conf.urls import include, url from django.contrib import admin +from django.urls import path +from django.views.generic import RedirectView from rest_framework.authtoken import views from rest_framework.routers import DefaultRouter @@ -37,6 +39,9 @@ # The Django admin url(r"admin/", admin.site.urls), + # Frontend assets TODO: this is pretty bad. + path('assets/', RedirectView.as_view(url='/static/assets/%(path)s')), + # Root of the Frontent url(r".*", IndexView.as_view()),