You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using netbox 2.11.12 and self-made plugin with some database models and a custom script which should use these models to do some changes in netbox objects.
To get these forms to render i used custom 'ObjectVar' class with from_field taken from DanSheps /
netbox_plugin_extensions.forms.fields.
Example:
class PluginObjectVar(ObjectVar):
form_field = PluginDynamicModelChoiceField
class SiteAddressFixer(Script):
class Meta:
name = "Site actualize"
site = ObjectVar(model=Site, required=True)
kladr_region = PluginObjectVar(model=kladr_models.Region)
kladr_district = PluginObjectVar(model=kladr_models.District)
kladr_city = PluginObjectVar(model=kladr_models.City)
kladr_street = PluginObjectVar(model=kladr_models.Street)
def run(self, data, commit):
...
When i run the script i can not choose any item in drop down menu (items are not clickable):
In other templates (eg 'inc/search_panel.html') views with my filterset_form inherited just from utilities.forms.BootstrapMixin, django.forms.Form and fields from netbox_plugin_extensions works well for models from that plugin.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I am using netbox 2.11.12 and self-made plugin with some database models and a custom script which should use these models to do some changes in netbox objects.
To get these forms to render i used custom 'ObjectVar' class with from_field taken from DanSheps /
netbox_plugin_extensions.forms.fields.
Example:
When i run the script i can not choose any item in drop down menu (items are not clickable):
In other templates (eg 'inc/search_panel.html') views with my filterset_form inherited just from utilities.forms.BootstrapMixin, django.forms.Form and fields from netbox_plugin_extensions works well for models from that plugin.
Am I getting or doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions