-
-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug Toolbar not displaying #1383
Comments
I have created a brand new environment.
services:
netbox:
ports:
- "8000:8080"
DEBUG=True
INTERNAL_IPS='127.0.0.1 172.20.0.1'
On the interface I get the bar saying its in Debug mode (as in image above) |
Do I need to add in the plugins for the toolbar, its not part of the repository code as is?
|
Also, I am doing this on a Windows machine....... that may be a factor, but its what Im required to work with. It shouldn't matter, but maybe it does |
When you run |
Note that in my test netbox-docker I have a clean install, no plugins just an out of the box, that I'm testing getting the debug_toolbar going. Although the original one does have a plugin and Dockerfile etc etc If I run collect static in the (basically brand new release 3.1.0) netbox container: docker exec -it test-netbox-netbox-1 bash
unit@becb4bcceeaa:/opt/netbox/netbox$ python3 /opt/netbox/netbox/manage.py collectstatic --no-input Im getting: PermissionError: [Errno 13] Permission denied: '/opt/netbox/netbox/static/debug_toolbar' or more thoroughly: 🧬 loaded config '/etc/netbox/config/configuration.py'
🧬 loaded config '/etc/netbox/config/extra.py'
🧬 loaded config '/etc/netbox/config/logging.py'
🧬 loaded config '/etc/netbox/config/plugins.py'
Traceback (most recent call last):
File "/opt/netbox/netbox/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/management/base.py", line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.12/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 209, in handle
collected = self.collect()
^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.12/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 135, in collect
handler(path, prefixed_path, storage)
File "/opt/netbox/venv/lib/python3.12/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 378, in copy_file
self.storage.save(prefixed_path, source_file)
File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/files/storage/base.py", line 49, in save
name = self._save(name, content)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/files/storage/filesystem.py", line 100, in _save
os.makedirs(directory, exist_ok=True)
File "<frozen os>", line 215, in makedirs
File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/opt/netbox/netbox/static/debug_toolbar' |
I did some more debugging and found this: |
- Fix netbox-community#1383: Setting DEBUG = true when collection the static files enables the use of the Django debug toolbar. - Fix netbox-community#1385: Use uv as package manager instead of pip speeds up the build.
@tobiasge likely something I'm doing, but I have
And I'm still seeing the 404 message for debug_toolbar static files |
- Fix netbox-community#1383: Setting DEBUG = true when collection the static files enables the use of the Django debug toolbar. - Fix netbox-community#1385: Use uv as package manager instead of pip speeds up the build.
- Fix netbox-community#1383: Setting DEBUG = true when collection the static files enables the use of the Django debug toolbar. - Fix netbox-community#1385: Use uv as package manager instead of pip speeds up the build. - Nice display of Docker image version
- Fix netbox-community#1383: Setting DEBUG = true when collection the static files enables the use of the Django debug toolbar. - Fix netbox-community#1385: Use uv as package manager instead of pip speeds up the build. - Nice display of Docker image version
Fixed in #1386 |
Current Behavior
Shows in debug but does not show toolbar
Seeing this in logs
GET /static/debug_toolbar/css/toolbar.css HTTP/1.1" 404
and the files do not exist in the container.
Have run build
Expected Behavior
To see the toolbar
Docker Compose Version
Docker Compose version v2.31.0-desktop.2
Docker Version
The git Revision
7ce715eabcf9ed24f550bdb1f29b988e3ea2896f
The git Status
Startup Command
docker compose up -d
NetBox Logs
Content of docker-compose.override.yml
The text was updated successfully, but these errors were encountered: