Skip to content

Commit

Permalink
fix(django_admin): Disable django_admin on prod (#52329)
Browse files Browse the repository at this point in the history
Disable django_admin on prod ,fix #23742 ,
getsentry/self-hosted#1039

cc @BYK 

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.
  • Loading branch information
klboke authored Jul 10, 2023
1 parent 836e0b0 commit 85a4fdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sentry/conf/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 85a4fdb

@BYK
Copy link
Member

@BYK BYK commented on 85a4fdb Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish my mention was not in the commit log 😅

Please sign in to comment.