mirror of
https://github.com/YunoHost-Apps/pyinventory_ynh.git
synced 2024-09-03 20:16:09 +02:00
Merge pull request #35 from YunoHost-Apps/root-url
Remove /admin/ from URLs
This commit is contained in:
commit
d93f3790da
1 changed files with 3 additions and 6 deletions
|
@ -2,7 +2,6 @@ from django.conf import settings
|
|||
from django.conf.urls import include, static
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
|
||||
# def debug_view(request):
|
||||
|
@ -18,14 +17,12 @@ from django.views.generic import RedirectView
|
|||
# return HttpResponse(html)
|
||||
|
||||
|
||||
# settings.PATH_URL is the $YNH_APP_ARG_PATH
|
||||
if settings.PATH_URL:
|
||||
# settings.PATH_URL is the $YNH_APP_ARG_PATH
|
||||
# Prefix all urls with "PATH_URL":
|
||||
urlpatterns = [
|
||||
path(f'{settings.PATH_URL}/admin/', 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}/debug/', debug_view),
|
||||
path(f'{settings.PATH_URL}/', admin.site.urls),
|
||||
|
||||
path(f'{settings.PATH_URL}/ckeditor/', include('ckeditor_uploader.urls')),
|
||||
|
||||
|
|
Loading…
Reference in a new issue