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
Hello
While building a plugin I noticed that when using bulk views there was an error in the namespace. Looking for the error I verified that the netbox didn't do the reverse for the bulk view.
By examining the core code, I found the problem. In the /opt/netbox/netbox/utilities/templatetags/helpers.py file, the viewname and validated_name functions when mounting the viewname variable do not take into account that the plugins are under the plugin app. And when creating the viewname it creates this way: :action. And not plugins::action. This causes an error in the bulk template when it is used.
To use netbox facilities I changed the functions. As shown below.
After the correction, both the bulk templates and all the buttons appeared correctly, without having to create templates.
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
While building a plugin I noticed that when using bulk views there was an error in the namespace. Looking for the error I verified that the netbox didn't do the reverse for the bulk view.
By examining the core code, I found the problem. In the /opt/netbox/netbox/utilities/templatetags/helpers.py file, the viewname and validated_name functions when mounting the viewname variable do not take into account that the plugins are under the plugin app. And when creating the viewname it creates this way: :action. And not plugins::action. This causes an error in the bulk template when it is used.
To use netbox facilities I changed the functions. As shown below.
After the correction, both the bulk templates and all the buttons appeared correctly, without having to create templates.
Beta Was this translation helpful? Give feedback.
All reactions