Skip to content

Commit

Permalink
Minor cleanups rockstor#2939
Browse files Browse the repository at this point in the history
  • Loading branch information
FroggyFlox committed Dec 24, 2024
1 parent 02f8ac0 commit 116b6eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/rockstor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
]

MIDDLEWARE = (
# "debug_toolbar.middleware.DebugToolbarMiddleware",
# New in 1.8, 1.11 newly sets Content-Length header.
# 'django.middleware.common.CommonMiddleware',
"django.contrib.sessions.middleware.SessionMiddleware",
Expand Down Expand Up @@ -203,7 +202,6 @@
"smart_manager",
"oauth2_provider",
"huey.contrib.djhuey",
# "debug_toolbar",
)

# https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-STORAGES
Expand Down Expand Up @@ -477,7 +475,7 @@

# DJANGO DEBUG TOOLBAR settings and configuration
# recommended NOT to use the toolbar when running tests
# so enable it only when NOT running tests or NOT DEBUG
# so enable it only when in DEBUG mode and NOT running tests
TESTING = "test" in sys.argv
if (not TESTING) and DEBUG:
INSTALLED_APPS = [
Expand Down
3 changes: 3 additions & 0 deletions src/rockstor/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@
),
]

# DJANGO DEBUG TOOLBAR
# recommended NOT to use the toolbar when running tests
# so enable it only when in DEBUG mode and NOT running tests
if (not settings.TESTING) and settings.DEBUG:
from debug_toolbar.toolbar import debug_toolbar_urls

Expand Down

0 comments on commit 116b6eb

Please sign in to comment.