From 6bbebdd37c186e6cde211e41da69c52c16fed380 Mon Sep 17 00:00:00 2001 From: catborise Date: Wed, 22 Jul 2020 11:24:01 +0300 Subject: [PATCH] not push only try to import debug_toolbar if settings.debug is true --- webvirtcloud/urls.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/webvirtcloud/urls.py b/webvirtcloud/urls.py index a2e14a8..52b6b88 100644 --- a/webvirtcloud/urls.py +++ b/webvirtcloud/urls.py @@ -19,8 +19,11 @@ urlpatterns = [ ] if settings.DEBUG: - import debug_toolbar + try: + import debug_toolbar - urlpatterns += [ - path('__debug__/', include(debug_toolbar.urls)), - ] + urlpatterns += [ + path('__debug__/', include(debug_toolbar.urls)), + ] + except: + pass