Skip to content

Commit c1ff748

Browse files
committed
#14036: Update import paths in example plugin code
1 parent 33af942 commit c1ff748

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/plugins/development/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The plugin source directory contains all the actual Python code and other resour
6969
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:
7070

7171
```python
72-
from extras.plugins import PluginConfig
72+
from netbox.plugins import PluginConfig
7373

7474
class FooBarConfig(PluginConfig):
7575
name = 'foo_bar'
@@ -121,7 +121,7 @@ All required settings must be configured by the user. If a configuration paramet
121121
Plugin configuration parameters can be accessed using the `get_plugin_config()` function. For example:
122122

123123
```python
124-
from extras.plugins import get_plugin_config
124+
from netbox.plugins import get_plugin_config
125125
get_plugin_config('my_plugin', 'verbose_name')
126126
```
127127

docs/plugins/development/navigation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
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.
66

77
```python title="navigation.py"
8-
from extras.plugins import PluginMenu
8+
from netbox.plugins import PluginMenu
99

1010
menu = PluginMenu(
1111
label='My Plugin',
@@ -49,7 +49,7 @@ menu_items = (item1, item2, item3)
4949
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.
5050

5151
```python title="navigation.py"
52-
from extras.plugins import PluginMenuButton, PluginMenuItem
52+
from netbox.plugins import PluginMenuButton, PluginMenuItem
5353
from utilities.choices import ButtonColorChoices
5454

5555
item1 = PluginMenuItem(

docs/plugins/development/views.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ For example, accessing `{{ request.user }}` within a template will return the cu
206206
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.
207207

208208
```python
209-
from extras.plugins import PluginTemplateExtension
209+
from netbox.plugins import PluginTemplateExtension
210210
from .models import Animal
211211

212212
class SiteAnimalCount(PluginTemplateExtension):

0 commit comments

Comments
 (0)