1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pyinventory_ynh.git synced 2024-09-03 20:16:09 +02:00

Remove /admin/ from URLs

This commit is contained in:
JensDiemer 2020-12-22 17:42:24 +01:00
parent 0a21da0e52
commit 098793d79b

View file

@ -2,7 +2,6 @@ from django.conf import settings
from django.conf.urls import include, static from django.conf.urls import include, static
from django.contrib import admin from django.contrib import admin
from django.urls import path from django.urls import path
from django.views.generic import RedirectView
# def debug_view(request): # def debug_view(request):
@ -18,14 +17,12 @@ from django.views.generic import RedirectView
# return HttpResponse(html) # return HttpResponse(html)
# settings.PATH_URL is the $YNH_APP_ARG_PATH
if settings.PATH_URL: if settings.PATH_URL:
# settings.PATH_URL is the $YNH_APP_ARG_PATH
# Prefix all urls with "PATH_URL": # Prefix all urls with "PATH_URL":
urlpatterns = [ urlpatterns = [
path(f'{settings.PATH_URL}/admin/', admin.site.urls), # path(f'{settings.PATH_URL}/debug/', debug_view),
path(f'{settings.PATH_URL}/', admin.site.urls),
# path(f'{settings.PATH_URL}/', debug_view),
path(f'{settings.PATH_URL}/', RedirectView.as_view(pattern_name='admin:index')),
path(f'{settings.PATH_URL}/ckeditor/', include('ckeditor_uploader.urls')), path(f'{settings.PATH_URL}/ckeditor/', include('ckeditor_uploader.urls')),