admin page template error when django-rq installed but webhooks disabled #2064

Closed
opened 2025-12-29 17:21:56 +01:00 by adam · 1 comment
Owner

Originally created by @candlerb on GitHub (Oct 12, 2018).

Note: this has been reported several times before (e.g. #2395, #2509, here, here, here, here). Here is how to reproduce it.

Environment

  • Python version: 3.5.2 (Ubuntu 16.04)
  • NetBox version: 2.4.6

Steps to Reproduce

  • Install django-rq package: pip3 install django-rq (which is a documented optional step)
  • However, leave WEBHOOKS = False in configuration.py
  • Start netbox
  • Navigate to /admin/

Expected Behavior

Netbox would show admin page as normal

Observed Behavior

image

With DEBUG = True:

Internal Server Error: /admin/
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py", line 35, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 158, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 156, in _get_response
    response = response.render()
  File "/usr/local/lib/python3.5/dist-packages/django/template/response.py", line 106, in render
    self.content = self.rendered_content
  File "/usr/local/lib/python3.5/dist-packages/django/template/response.py", line 81, in rendered_content
    template = self.resolve_template(self.template_name)
  File "/usr/local/lib/python3.5/dist-packages/django/template/response.py", line 65, in resolve_template
    return get_template(template, using=self.using)
  File "/usr/local/lib/python3.5/dist-packages/django/template/loader.py", line 19, in get_template
    raise TemplateDoesNotExist(template_name, chain=chain)
django.template.exceptions.TemplateDoesNotExist: django_rq/index.html

Workaround

pip3 uninstall django-rq if you are not using webhooks

Originally created by @candlerb on GitHub (Oct 12, 2018). Note: this has been reported several times before (e.g. #2395, #2509, [here](https://groups.google.com/forum/#!topic/netbox-discuss/JP0TOhZejaI), [here](https://groups.google.com/forum/#!topic/netbox-discuss/_Eb3dYQLhi4), [here](https://groups.google.com/forum/#!topic/netbox-discuss/-yDaW8JuF_w), [here](https://groups.google.com/forum/#!topic/netbox-discuss/b_hTV7jBcpQ)). Here is how to [reproduce it](https://github.com/digitalocean/netbox/issues/2395#issuecomment-417658507). ### Environment * Python version: 3.5.2 (Ubuntu 16.04) * NetBox version: 2.4.6 ### Steps to Reproduce * Install django-rq package: `pip3 install django-rq` (which is a [documented optional step](https://netbox.readthedocs.io/en/latest/installation/2-netbox/#webhooks-optional)) * However, leave `WEBHOOKS = False` in configuration.py * Start netbox * Navigate to `/admin/` ### Expected Behavior Netbox would show admin page as normal ### Observed Behavior ![image](https://user-images.githubusercontent.com/44789/46859168-eb705a00-ce04-11e8-824c-69cde5c5dab2.png) With `DEBUG = True`: ``` Internal Server Error: /admin/ Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py", line 35, in inner response = get_response(request) File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 158, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py", line 156, in _get_response response = response.render() File "/usr/local/lib/python3.5/dist-packages/django/template/response.py", line 106, in render self.content = self.rendered_content File "/usr/local/lib/python3.5/dist-packages/django/template/response.py", line 81, in rendered_content template = self.resolve_template(self.template_name) File "/usr/local/lib/python3.5/dist-packages/django/template/response.py", line 65, in resolve_template return get_template(template, using=self.using) File "/usr/local/lib/python3.5/dist-packages/django/template/loader.py", line 19, in get_template raise TemplateDoesNotExist(template_name, chain=chain) django.template.exceptions.TemplateDoesNotExist: django_rq/index.html ``` ### Workaround `pip3 uninstall django-rq` if you are not using webhooks
adam closed this issue 2025-12-29 17:21:56 +01:00
Author
Owner

@candlerb commented on GitHub (Oct 12, 2018):

I found that someone already submitted a fix in PR #2408.

I can confirm that the problem goes away when I apply this.

@candlerb commented on GitHub (Oct 12, 2018): I found that someone already submitted a fix in PR #2408. I can confirm that the problem goes away when I apply this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2064