From 1a1606b00352f0230e0b9dcfcda27d1e74d53584 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 12 Nov 2021 17:12:41 +0000 Subject: [PATCH] use URL_PREFIX --- app/settings.py | 1 + app/urls.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/settings.py b/app/settings.py index 806696a..e74376c 100755 --- a/app/settings.py +++ b/app/settings.py @@ -131,6 +131,7 @@ STATIC_ROOT = BASE_DIR / 'www' / 'static' MEDIA_ROOT = BASE_DIR / 'data' / 'media' TITLE = 'Example Timeline' +URL_PREFIX = '' STATICFILES_FINDERS = [ 'django.contrib.staticfiles.finders.FileSystemFinder', diff --git a/app/urls.py b/app/urls.py index 6d2c8d8..62faf19 100755 --- a/app/urls.py +++ b/app/urls.py @@ -21,7 +21,7 @@ from django.conf import settings from .event import views as event_views urlpatterns = [ - path('admin/', admin.site.urls), - path('', event_views.index, name='index'), - path('', event_views.index, name='index'), + path(settings.URL_PREFIX + 'admin/', admin.site.urls), + path(settings.URL_PREFIX + '', event_views.index, name='index'), + path(settings.URL_PREFIX + '', event_views.index, name='index'), ]