Skip to content

Commit bdeeec5

Browse files
authored
Netbox3.5 compatibility (#131)
* NetBox 3.5 compatibility fix * v0.12.0
1 parent 7efc5e0 commit bdeeec5

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

nextbox_ui_plugin/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class NextBoxUIConfig(PluginConfig):
44
name = 'nextbox_ui_plugin'
55
verbose_name = 'NextBox UI'
66
description = 'A topology visualization plugin for Netbox powered by NextUI Toolkit.'
7-
version = '0.11.0'
7+
version = '0.12.0'
88
author = 'Igor Korotchenkov'
99
author_email = 'iDebugAll@gmail.com'
1010
base_url = 'nextbox-ui'

nextbox_ui_plugin/forms.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
from django import forms
22
from ipam.models import VLAN
3-
from utilities.forms import (
4-
BootstrapMixin,
5-
DynamicModelMultipleChoiceField,
6-
DynamicModelChoiceField
7-
)
83
from .models import SavedTopology
94
from dcim.models import Device, Site, Region
105
from django.conf import settings
@@ -20,6 +15,19 @@
2015
if NETBOX_CURRENT_VERSION >= version.parse("3.0") :
2116
from django.utils.translation import gettext as _
2217

18+
if NETBOX_CURRENT_VERSION < version.parse("3.5"):
19+
from utilities.forms import (
20+
BootstrapMixin,
21+
DynamicModelMultipleChoiceField,
22+
DynamicModelChoiceField
23+
)
24+
else:
25+
from utilities.forms import BootstrapMixin
26+
from utilities.forms.fields import (
27+
DynamicModelMultipleChoiceField,
28+
DynamicModelChoiceField
29+
)
30+
2331

2432
class TopologyFilterForm(BootstrapMixin, forms.Form):
2533

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
setup(
99
name='nextbox_ui_plugin',
10-
version='0.11.0',
10+
version='0.12.0',
1111
url='https://github.com/iDebugAll/nextbox-ui-plugin',
12-
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.11.0.tar.gz',
12+
download_url='https://github.com/iDebugAll/nextbox-ui-plugin/archive/v0.12.0.tar.gz',
1313
description='A topology visualization plugin for Netbox powered by NextUI Toolkit.',
1414
long_description=long_description,
1515
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)