diff --git a/docs/plugins/development/index.md b/docs/plugins/development/index.md index d3f50a0fb..4db1d5ef6 100644 --- a/docs/plugins/development/index.md +++ b/docs/plugins/development/index.md @@ -69,7 +69,7 @@ The plugin source directory contains all the actual Python code and other resour The `PluginConfig` class is a NetBox-specific wrapper around Django's built-in [`AppConfig`](https://docs.djangoproject.com/en/stable/ref/applications/) class. It is used to declare NetBox plugin functionality within a Python package. Each plugin should provide its own subclass, defining its name, metadata, and default and required configuration parameters. An example is below: ```python -from extras.plugins import PluginConfig +from netbox.plugins import PluginConfig class FooBarConfig(PluginConfig): name = 'foo_bar' @@ -121,7 +121,7 @@ All required settings must be configured by the user. If a configuration paramet Plugin configuration parameters can be accessed using the `get_plugin_config()` function. For example: ```python - from extras.plugins import get_plugin_config + from netbox.plugins import get_plugin_config get_plugin_config('my_plugin', 'verbose_name') ``` diff --git a/docs/plugins/development/navigation.md b/docs/plugins/development/navigation.md index 8d7580147..dc895b2ab 100644 --- a/docs/plugins/development/navigation.md +++ b/docs/plugins/development/navigation.md @@ -5,7 +5,7 @@ A plugin can register its own submenu as part of NetBox's navigation menu. This is done by defining a variable named `menu` in `navigation.py`, pointing to an instance of the `PluginMenu` class. Each menu must define a label and grouped menu items (discussed below), and may optionally specify an icon. An example is shown below. ```python title="navigation.py" -from extras.plugins import PluginMenu +from netbox.plugins import PluginMenu menu = PluginMenu( label='My Plugin', @@ -49,7 +49,7 @@ menu_items = (item1, item2, item3) Each menu item represents a link and (optionally) a set of buttons comprising one entry in NetBox's navigation menu. Menu items are defined as PluginMenuItem instances. An example is shown below. ```python title="navigation.py" -from extras.plugins import PluginMenuButton, PluginMenuItem +from netbox.plugins import PluginMenuButton, PluginMenuItem from utilities.choices import ButtonColorChoices item1 = PluginMenuItem( diff --git a/docs/plugins/development/views.md b/docs/plugins/development/views.md index 3d0e87a68..1730b0ebd 100644 --- a/docs/plugins/development/views.md +++ b/docs/plugins/development/views.md @@ -206,7 +206,7 @@ For example, accessing `{{ request.user }}` within a template will return the cu Declared subclasses should be gathered into a list or tuple for integration with NetBox. By default, NetBox looks for an iterable named `template_extensions` within a `template_content.py` file. (This can be overridden by setting `template_extensions` to a custom value on the plugin's PluginConfig.) An example is below. ```python -from extras.plugins import PluginTemplateExtension +from netbox.plugins import PluginTemplateExtension from .models import Animal class SiteAnimalCount(PluginTemplateExtension):