fix: debug toolbar import error when running on production setting with DEBUG on (#3085)

This commit is contained in:
Nikhil 2023-12-12 11:54:52 +05:30 committed by GitHub
parent 361ee16567
commit 1795916042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,8 +19,11 @@ urlpatterns = [
if settings.DEBUG: if settings.DEBUG:
try:
import debug_toolbar import debug_toolbar
urlpatterns = [ urlpatterns = [
re_path(r"^__debug__/", include(debug_toolbar.urls)), re_path(r"^__debug__/", include(debug_toolbar.urls)),
] + urlpatterns ] + urlpatterns
except ImportError:
pass