From 09a8f223dd4586171773e480bd0784868d0f8dcf Mon Sep 17 00:00:00 2001 From: kl Date: Thu, 6 Jul 2023 12:51:50 +0800 Subject: [PATCH] fix(django_admin): Disable django_admin on prod --- src/sentry/conf/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sentry/conf/urls.py b/src/sentry/conf/urls.py index 15d3c3af373784..6053b9ec144d7a 100644 --- a/src/sentry/conf/urls.py +++ b/src/sentry/conf/urls.py @@ -29,7 +29,7 @@ ), ] -if "django.contrib.admin" in settings.INSTALLED_APPS: +if "django.contrib.admin" in settings.INSTALLED_APPS and settings.ADMIN_ENABLED: from sentry import django_admin urlpatterns += django_admin.urlpatterns