Do not load the admin interface in prod
This commit is contained in:
parent
f7b69f7704
commit
889b53c2ff
|
@ -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 \
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue