Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
Fix redirect for subpaths (hopefully)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielquinn committed May 28, 2018
1 parent 4386b09 commit 4585308
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/paperless/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.conf import settings
from django.conf.urls import include, static, url
from django.contrib import admin
from django.urls import reverse_lazy
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import RedirectView
from rest_framework.routers import DefaultRouter
Expand Down Expand Up @@ -45,7 +46,8 @@
url(r"admin/", admin.site.urls),

# Redirect / to /admin
url(r"^$", RedirectView.as_view(permanent=True, url="/admin/")),
url(r"^$", RedirectView.as_view(
permanent=True, url=reverse_lazy("admin:index"))),

] + static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Expand Down

0 comments on commit 4585308

Please sign in to comment.