From bbae18bcf346d40ad2215a632128ba095deaf41b Mon Sep 17 00:00:00 2001 From: j Date: Sun, 10 Oct 2021 12:42:50 +0100 Subject: [PATCH] add prefix --- app/settings.py | 2 ++ app/urls.py | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/settings.py b/app/settings.py index 4a2f6c6..8fe4332 100644 --- a/app/settings.py +++ b/app/settings.py @@ -146,3 +146,5 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' TIMELINE_PREFIX = "https://aab21.pad.ma/" + +URL_PREFIX = 'polis+' diff --git a/app/urls.py b/app/urls.py index c81e92f..96d308a 100644 --- a/app/urls.py +++ b/app/urls.py @@ -15,6 +15,7 @@ Including another URLconf """ from django.contrib import admin from django.urls import path +from django.conf import settings from .video import views as video from .text import views as text @@ -22,16 +23,16 @@ from .text import views as text urlpatterns = [ path('admin/', admin.site.urls), #path('pandoraAPI/', video.pandoraAPI, name='pandoraAPI'), - path('films/', video.films, name='films'), - path('film//play/', video.film_play, name='film_play'), - path('film//', video.film, name='film'), - path('edits/', video.edits, name='edits'), - path('edit//play/', video.edit_play, name='edit_play'), - path('edit//', video.edit, name='edit'), - path('tv/', video.tv, name='tv'), - path('essays/', text.essays, name='essays'), - path('essay//', text.essay, name='essay'), - path('about/', text.about, name='about'), + path(settings.URL_PREFIX + 'films/', video.films, name='films'), + path(settings.URL_PREFIX + 'film//play/', video.film_play, name='film_play'), + path(settings.URL_PREFIX + 'film//', video.film, name='film'), + path(settings.URL_PREFIX + 'edits/', video.edits, name='edits'), + path(settings.URL_PREFIX + 'edit//play/', video.edit_play, name='edit_play'), + path(settings.URL_PREFIX + 'edit//', video.edit, name='edit'), + path(settings.URL_PREFIX + 'tv/', video.tv, name='tv'), + path(settings.URL_PREFIX + 'essays/', text.essays, name='essays'), + path(settings.URL_PREFIX + 'essay//', text.essay, name='essay'), + path(settings.URL_PREFIX + 'about/', text.about, name='about'), - path('', text.index, name='index'), + path(settings.URL_PREFIX[:-1], text.index, name='index'), ]