Skip to content
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

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

Closed
candlerb opened this issue Oct 12, 2018 · 1 comment · Fixed by #2408
Closed

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

candlerb opened this issue Oct 12, 2018 · 1 comment · Fixed by #2408

Comments

@candlerb
Copy link
Contributor

candlerb commented 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

@candlerb
Copy link
Contributor Author

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

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

jeremystretch added a commit that referenced this issue Oct 16, 2018
Fix #2515: Modify only when webhooks are enabled
jeremystretch added a commit that referenced this issue Oct 16, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant