Netbox: Admin section issue

Created on 27 Aug 2018  路  4Comments  路  Source: netbox-community/netbox

Hi!

Environment

  • Python version: Python 3.6.5
  • NetBox version: 2.4.4 (moved from different server from version: 2.3.1)

Steps to Reproduce

The page https://netbox.domain.local/admin/ shows error:


django_rq/index.html

Expected Behavior

Get control panel


### Observed Behavior
-

Thank you.

Most helpful comment

Hello,

@jeremystretch
we are also facing this issue. The problem is with having django_rq installed but webhooks disabled. This happens when using the Docker container from Nine.ch. In this container the django_rq is always installed, but you can still disable the webhooks backend.

So when webhooks are disabled in the settings.py you have these lines (from 161):

# Only load django-rq if the webhook backend is enabled
if WEBHOOKS_ENABLED:
    INSTALLED_APPS.append('django_rq')

And in the netbox/admin.py you have this (from line 25):

# Modify the template to include an RQ link if django_rq is installed (see RQ_SHOW_ADMIN_LINK)
try:
    import django_rq
    admin_site.index_template = 'django_rq/index.html'
except ImportError:
    pass

I think a good fix for this would be to check in admin.py if the setting WEBHOOKS_ENABLED is true.

Kind regards
Tobias

All 4 comments

Thank you for your interest in NetBox. GitHub issues are intended for reporting reproducible bugs and requesting features, and must be submitted using the template provided here. For general discussion, questions, or assistance with installation issues, please post to our mailing list.

Hello,

@jeremystretch
we are also facing this issue. The problem is with having django_rq installed but webhooks disabled. This happens when using the Docker container from Nine.ch. In this container the django_rq is always installed, but you can still disable the webhooks backend.

So when webhooks are disabled in the settings.py you have these lines (from 161):

# Only load django-rq if the webhook backend is enabled
if WEBHOOKS_ENABLED:
    INSTALLED_APPS.append('django_rq')

And in the netbox/admin.py you have this (from line 25):

# Modify the template to include an RQ link if django_rq is installed (see RQ_SHOW_ADMIN_LINK)
try:
    import django_rq
    admin_site.index_template = 'django_rq/index.html'
except ImportError:
    pass

I think a good fix for this would be to check in admin.py if the setting WEBHOOKS_ENABLED is true.

Kind regards
Tobias

@jeremystretch The link you provide to the template isn't working :(
2018-11-06_16 15 09
(we are facing that issue on 2.4.6 now )

Upgrade to 2.4.7, a fix was just merged into master and 2.4.7 was released.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hellerve picture hellerve  路  3Comments

billyzoellers picture billyzoellers  路  3Comments

tyler-8 picture tyler-8  路  3Comments

Ali-Yazdani picture Ali-Yazdani  路  3Comments

aarjbdea picture aarjbdea  路  3Comments