diff --git a/aldryn_django_debug_toolbar/urls.py b/aldryn_django_debug_toolbar/urls.py index 0656834..64ee268 100644 --- a/aldryn_django_debug_toolbar/urls.py +++ b/aldryn_django_debug_toolbar/urls.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*- +from django.conf import settings from django.conf.urls import url, include +import sys import debug_toolbar -urlpatterns = [url(r'^__debug__/', include(debug_toolbar.urls))] +if settings.DEBUG and 'test' not in sys.argv: + urlpatterns = [url(r'^__debug__/', include(debug_toolbar.urls))]