diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 213f62734d..fb2bd0668a 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -372,19 +372,6 @@ if LDAP_AUTH: AUTH_LDAP_USER_FLAGS_BY_GROUP = get_setting("INVENTREE_LDAP_USER_FLAGS_BY_GROUP", "ldap.user_flags_by_group", {}, dict) AUTH_LDAP_FIND_GROUP_PERMS = True -DEBUG_TOOLBAR_ENABLED = DEBUG and get_setting('INVENTREE_DEBUG_TOOLBAR', 'debug_toolbar', False) - -# If the debug toolbar is enabled, add the modules -if DEBUG_TOOLBAR_ENABLED: # pragma: no cover - logger.info("Running with DEBUG_TOOLBAR enabled") - INSTALLED_APPS.append('debug_toolbar') - MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware') - - DEBUG_TOOLBAR_CONFIG = { - 'RESULTS_CACHE_SIZE': 100, - 'OBSERVE_REQUEST_CALLBACK': lambda x: False, - } - # Internal IP addresses allowed to see the debug toolbar INTERNAL_IPS = [ '127.0.0.1', @@ -437,12 +424,6 @@ TEMPLATES = [ }, ] -if DEBUG_TOOLBAR_ENABLED: # pragma: no cover - # Note that the APP_DIRS value must be set when using debug_toolbar - # But this will kill template loading for plugins - TEMPLATES[0]['APP_DIRS'] = True - del TEMPLATES[0]['OPTIONS']['loaders'] - REST_FRAMEWORK = { 'EXCEPTION_HANDLER': 'InvenTree.exceptions.exception_handler', 'DATETIME_FORMAT': '%Y-%m-%d %H:%M', diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 3a9a00d214..2baade9a2a 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -249,13 +249,6 @@ if settings.DEBUG: # Media file access urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) - # Debug toolbar access (only allowed in DEBUG mode) - if settings.DEBUG_TOOLBAR_ENABLED: - import debug_toolbar - urlpatterns = [ - path('__debug__/', include(debug_toolbar.urls)), - ] + urlpatterns - # Redirect for favicon.ico urlpatterns.append( path('favicon.ico', RedirectView.as_view(url=f'{settings.STATIC_URL}img/favicon/favicon.ico')) diff --git a/docs/docs/credits.md b/docs/docs/credits.md index c673b224c6..91df5d8778 100644 --- a/docs/docs/credits.md +++ b/docs/docs/credits.md @@ -28,8 +28,6 @@ InvenTree relies on the following Python libraries: | [rapidfuzz](https://pypi.org/project/rapidfuzz/) | MIT | Fuzzy string matching | | [django-stdimage](https://pypi.org/project/django-stdimage/) | MIT | Advanced image fields for django | | [django-weasyprint](https://pypi.org/project/django-weasyprint/) | Apache 2.0 | PDF generation | -| [django-debug-toolbar](https://pypi.org/project/django-debug-toolbar/) | BSD | Debug interface | -| [django-admin-shell](https://pypi.org/project/django-admin-shell/) | MIT | Command line shell for the admin interface | | [django-money](https://pypi.org/project/django-money/) | BSD | Currency support | | [certifi](https://pypi.org/project/certifi/) | MPL 2.0 | Web certification | | [django-error-report](https://pypi.org/project/django-error-report/) | BSD | Error / excepttion management | diff --git a/requirements-dev.in b/requirements-dev.in index 4d7b924949..d27042e739 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -2,7 +2,6 @@ -c requirements.txt coverage[toml] # Unit test coverage coveralls==2.1.2 # Coveralls linking (for tracking coverage) # PINNED 2022-06-28 - Old version needed for correct upload -django-debug-toolbar # Debug / profiling toolbar django-slowtests # Show which unit tests are running slowly django-test-migrations # Unit testing for database migrations isort # python import sorting diff --git a/requirements-dev.txt b/requirements-dev.txt index 3cb5b66492..6d34271c89 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -42,10 +42,7 @@ distlib==0.3.7 django==3.2.23 # via # -c requirements.txt - # django-debug-toolbar # django-slowtests -django-debug-toolbar==4.2.0 - # via -r requirements-dev.in django-slowtests==1.1.1 # via -r requirements-dev.in django-test-migrations==1.3.0 @@ -102,7 +99,6 @@ sqlparse==0.4.4 # via # -c requirements.txt # django - # django-debug-toolbar toml==0.10.2 # via coverage tomli==2.0.1