use URL_PREFIX

This commit is contained in:
j 2021-11-12 17:12:41 +00:00
parent 6565265057
commit 1a1606b003
2 changed files with 4 additions and 3 deletions

View file

@ -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',

View file

@ -21,7 +21,7 @@ from django.conf import settings
from .event import views as event_views
urlpatterns = [
path('admin/', admin.site.urls),
path('<str:slug>', event_views.index, name='index'),
path('', event_views.index, name='index'),
path(settings.URL_PREFIX + 'admin/', admin.site.urls),
path(settings.URL_PREFIX + '<str:slug>', event_views.index, name='index'),
path(settings.URL_PREFIX + '', event_views.index, name='index'),
]