1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixed debug toolbar display

This commit is contained in:
Jeremy Stretch
2016-12-26 12:15:14 -05:00
parent a5fe4468d0
commit edb8904474
2 changed files with 14 additions and 1 deletions

View File

@ -118,7 +118,6 @@ INSTALLED_APPS = (
# Middleware
MIDDLEWARE = (
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@ -129,6 +128,8 @@ MIDDLEWARE = (
'django.middleware.security.SecurityMiddleware',
'utilities.middleware.LoginRequiredMiddleware',
)
if DEBUG:
MIDDLEWARE = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE
ROOT_URLCONF = 'netbox.urls'
@ -194,6 +195,12 @@ SWAGGER_SETTINGS = {
'base_path': '{}/{}api/docs'.format(ALLOWED_HOSTS[0], BASE_PATH),
}
# Django debug toolbar
INTERNAL_IPS = (
'127.0.0.1',
'::1',
)
try:
HOSTNAME = socket.gethostname()