Django toolbar doesn't appear #3485

Closed
opened 2025-12-29 18:29:27 +01:00 by adam · 6 comments
Owner

Originally created by @sasa1199 on GitHub (Mar 18, 2020).

Environment

Python version: 3.6.9
NetBox version: Example: 2.7.3

Hi!
I have a problem with the Django Toolbar.
I set the debug mode: True and tried all the steps from the official installation as well to solve the problem, but the toolbar on the site still doesn't show up.
Can somebody help me?

netbox/netbox/settings.py:

DEBUG = getattr(configuration, 'DEBUG', True)
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.humanize',
    'debug_toolbar',
    'cacheops',
    'corsheaders',
    'django_filters',
    'django_rq',
    'django_tables2',
    'django_prometheus',
    'mptt',
    'rest_framework',
    'taggit',
    'taggit_serializer',
    'timezone_field',
    'circuits',
    'dcim',
    'ipam',
    'extras',
    'secrets',
    'tenancy',
    'users',
    'utilities',
    'virtualization',
    'drf_yasg',
]

MIDDLEWARE = (
    'debug_toolbar.middleware.DebugToolbarMiddleware',
    'django_prometheus.middleware.PrometheusBeforeMiddleware',
    'corsheaders.middleware.CorsMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'utilities.middleware.ExceptionHandlingMiddleware',
    'utilities.middleware.LoginRequiredMiddleware',
    'utilities.middleware.APIVersionMiddleware',
    'extras.middleware.ObjectChangeMiddleware',
    'django_prometheus.middleware.PrometheusAfterMiddleware',
)
INTERNAL_IPS = (
    '127.0.0.1',
    '::1',
)

DEBUG_TOOLBAR_PANELS = [
    'debug_toolbar.panels.versions.VersionsPanel',
    'debug_toolbar.panels.timer.TimerPanel',
    'debug_toolbar.panels.settings.SettingsPanel',
    'debug_toolbar.panels.headers.HeadersPanel',
    'debug_toolbar.panels.request.RequestPanel',
    'debug_toolbar.panels.sql.SQLPanel',
    'debug_toolbar.panels.staticfiles.StaticFilesPanel',
    'debug_toolbar.panels.templates.TemplatesPanel',
    'debug_toolbar.panels.cache.CachePanel',
    'debug_toolbar.panels.signals.SignalsPanel',
    'debug_toolbar.panels.logging.LoggingPanel',
    'debug_toolbar.panels.redirects.RedirectsPanel',
    'debug_toolbar.panels.profiling.ProfilingPanel',
 ]

netbox/netbox/urls.py

if settings.DEBUG:
    import debug_toolbar
    urlpatterns = [
        path('__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns
Originally created by @sasa1199 on GitHub (Mar 18, 2020). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment Python version: 3.6.9 NetBox version: Example: 2.7.3 Hi! I have a problem with the Django Toolbar. I set the debug mode: True and tried all the steps from the official installation as well to solve the problem, but the toolbar on the site still doesn't show up. Can somebody help me? <h2>netbox/netbox/settings.py:</h2> ```python DEBUG = getattr(configuration, 'DEBUG', True) INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'debug_toolbar', 'cacheops', 'corsheaders', 'django_filters', 'django_rq', 'django_tables2', 'django_prometheus', 'mptt', 'rest_framework', 'taggit', 'taggit_serializer', 'timezone_field', 'circuits', 'dcim', 'ipam', 'extras', 'secrets', 'tenancy', 'users', 'utilities', 'virtualization', 'drf_yasg', ] MIDDLEWARE = ( 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django_prometheus.middleware.PrometheusBeforeMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'utilities.middleware.ExceptionHandlingMiddleware', 'utilities.middleware.LoginRequiredMiddleware', 'utilities.middleware.APIVersionMiddleware', 'extras.middleware.ObjectChangeMiddleware', 'django_prometheus.middleware.PrometheusAfterMiddleware', ) INTERNAL_IPS = ( '127.0.0.1', '::1', ) DEBUG_TOOLBAR_PANELS = [ 'debug_toolbar.panels.versions.VersionsPanel', 'debug_toolbar.panels.timer.TimerPanel', 'debug_toolbar.panels.settings.SettingsPanel', 'debug_toolbar.panels.headers.HeadersPanel', 'debug_toolbar.panels.request.RequestPanel', 'debug_toolbar.panels.sql.SQLPanel', 'debug_toolbar.panels.staticfiles.StaticFilesPanel', 'debug_toolbar.panels.templates.TemplatesPanel', 'debug_toolbar.panels.cache.CachePanel', 'debug_toolbar.panels.signals.SignalsPanel', 'debug_toolbar.panels.logging.LoggingPanel', 'debug_toolbar.panels.redirects.RedirectsPanel', 'debug_toolbar.panels.profiling.ProfilingPanel', ] ``` <h2>netbox/netbox/urls.py</h2> ```python if settings.DEBUG: import debug_toolbar urlpatterns = [ path('__debug__/', include(debug_toolbar.urls)), ] + urlpatterns ```
adam closed this issue 2025-12-29 18:29:27 +01:00
Author
Owner

@hSaria commented on GitHub (Mar 18, 2020):

If the NetBox instance is not running locally (i.e. you're accessing a remote server), then you need to add your IP to INTERNAL_IPS as per the debug toolbar's documentation.

@hSaria commented on GitHub (Mar 18, 2020): If the NetBox instance is not running locally (i.e. you're accessing a remote server), then you need to add your IP to `INTERNAL_IPS` as per the debug toolbar's [documentation](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#configuring-internal-ips).
Author
Owner

@sasa1199 commented on GitHub (Mar 18, 2020):

If the NetBox instance is not running locally (i.e. you're accessing a remote server), then you need to add your IP to INTERNAL_IPS as per the debug toolbar's documentation.

Hi! I run it locally python3 manage.py runserver 0.0.0.0:8000 --insecure or python3 manage.py runserver 0.0.0.0:8000, but still doesn't show up

@sasa1199 commented on GitHub (Mar 18, 2020): > If the NetBox instance is not running locally (i.e. you're accessing a remote server), then you need to add your IP to `INTERNAL_IPS` as per the debug toolbar's [documentation](https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#configuring-internal-ips). Hi! I run it locally python3 manage.py runserver 0.0.0.0:8000 --insecure or python3 manage.py runserver 0.0.0.0:8000, but still doesn't show up
Author
Owner

@hSaria commented on GitHub (Mar 18, 2020):

I've just configured it and can confirm it works. This is probably a discussion best suited for the mailing list.

@hSaria commented on GitHub (Mar 18, 2020): I've just configured it and can confirm it works. This is probably a discussion best suited for the [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
Author
Owner

@sasa1199 commented on GitHub (Mar 18, 2020):

I've just configured it and can confirm it works. This is probably a discussion best suited for the mailing list.

Okay, I've made a discussion https://groups.google.com/forum/#!topic/netbox-discuss/sLwXQp7ZkYA

@sasa1199 commented on GitHub (Mar 18, 2020): > I've just configured it and can confirm it works. This is probably a discussion best suited for the [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss). Okay, I've made a discussion https://groups.google.com/forum/#!topic/netbox-discuss/sLwXQp7ZkYA
Author
Owner

@sasa1199 commented on GitHub (Mar 20, 2020):

Well it's still unsolved, nobody gave me the answer, why is the toolbar doesn't show up

@sasa1199 commented on GitHub (Mar 20, 2020): Well it's still unsolved, nobody gave me the answer, why is the toolbar doesn't show up
Author
Owner

@hSaria commented on GitHub (Mar 20, 2020):

You just created a forum discussion with nothing more than a link to this ticket, making it difficult for people to assist you. Try making a standalone discussion describing the problem you're facing and sharing any relevant information, like the way you have NetBox deployed/running.

Here on GitHub, the issues are used to track development efforts.

P.S. Try accessing your server using http://127.0.0.1:8000.

@hSaria commented on GitHub (Mar 20, 2020): You just created a forum discussion with nothing more than a link to this ticket, making it difficult for people to assist you. Try making a standalone discussion describing the problem you're facing and sharing any relevant information, like the way you have NetBox deployed/running. Here on GitHub, the issues are used to track development efforts. P.S. Try accessing your server using http://127.0.0.1:8000.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3485