marcus-crane / netbox-plugin-azuread

A plugin that enables users to authenticate with Netbox using Azure Active Directory
18 stars 5 forks source link

Latest release 1.1.0 not working with Netbox 2.10 #9

Closed kbcz1989 closed 3 years ago

kbcz1989 commented 3 years ago

Hello @marcus-crane.

Thank you for this great plugin. I was just testing today when I realized that the latest update is not working on Netbox 2.10.

Server Error

There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.template.exceptions.TemplateDoesNotExist'>

base/base.html

Python version: 3.8.7
NetBox version: 2.10.4

If further assistance is required, please post to the NetBox mailing list. 
marcus-crane commented 3 years ago

Hey there,

Just letting you know that this will likely be because the Netbox templates themselves have changed in between versions so while that template does appear to exist in the repo (base/base.html), the actual block being overriden has a different name.

What I'll likely do here is have a 2.x compatible template (ie; a second template) and based on the detected Netbox version, I'll render either the newer template or the older template.

For now, I recommend sticking to netbox_plugin_azuread==1.0.2 as there is no functional difference while I work on setting up a version of Netbox 2.x to develop against.

It's also a good reminder to pin your dependencies, if you haven't already 🙂

marcus-crane commented 3 years ago

Hey @kbcz1989,

Apologies for the delay with this issue, although nothing has substantially changed with the plugin so it's not like you were missing out on anything!

Anyway, I've just released v1.1.2 which dynamically renders either a 2.x compatible template (just the original template) or a 3.x compatible template (the new fancy one) depending on your Netbox version.

I wanted to get this one out of the way since I just added some verbose debug logging (v1.1.1) and didn't want 2.x users to miss out on new functionality.

kbcz1989 commented 2 years ago

Hello @marcus-crane. Thank you very much for the update. I will try to find time to test it again.