Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Only modify urls if running as DEBUG and not during unit tests. #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion aldryn_django_debug_toolbar/urls.py
Original file line number Diff line number Diff line change
@@ -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))]
Copy link

Choose a reason for hiding this comment

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

url is Django < 2, Will need a check for path for 2 =>