Do not load the admin interface in prod

This commit is contained in:
Lukáš Kucharczyk 2023-01-07 21:59:54 +01:00
parent f7b69f7704
commit 889b53c2ff
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
2 changed files with 5 additions and 2 deletions

View File

@ -6,7 +6,7 @@ RUN npm install && \
FROM python:3.10.9-alpine
ENV VERSION_NUMBER 0.1.1-7-g1ccfdc3
ENV VERSION_NUMBER 0.1.1-8-gf7b69f7
ENV PROD 1
RUN apk add \

View File

@ -16,10 +16,13 @@ Including another URLconf
from django.contrib import admin
from django.urls import include, path
from django.views.generic import RedirectView
from django.conf import settings
urlpatterns = [
path("admin/", admin.site.urls),
path("", RedirectView.as_view(url="/tracker/list-sessions")),
path("tracker/", include("tracker.urls")),
]
if settings.DEBUG:
urlpatterns.append(path("admin/", admin.site.urls))