Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 5 additions & 7 deletions aplus/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,8 @@
INTERNAL_IPS.append('127.0.0.1')
except NameError:
INTERNAL_IPS = ['127.0.0.1']
try:
# pylint: disable-next=used-before-assignment
DEBUG_TOOLBAR_CONFIG.setdefault('SHOW_TOOLBAR_CONFIG', 'lib.helpers.show_debug_toolbar')
except NameError:
DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': 'lib.helpers.show_debug_toolbar',
}
# Configure Debug Toolbar to work under Docker by auto-detecting the gateway IP
# See: https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#docker
DEBUG_TOOLBAR_CONFIG = globals().get('DEBUG_TOOLBAR_CONFIG', {})
# Always use the Docker-aware callback so toolbar shows when accessed via localhost
DEBUG_TOOLBAR_CONFIG.setdefault('SHOW_TOOLBAR_CALLBACK', 'debug_toolbar.middleware.show_toolbar_with_docker')
2 changes: 1 addition & 1 deletion requirements_testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ coverage
# Required to run browser tests:
selenium
pyvirtualdisplay
django-debug-toolbar >= 3.2.2, < 4
django-debug-toolbar >= 6.1.0, < 7
prospector
pytest-playwright
pytest-django
Expand Down
Loading