Skip to content

Fix import path on step 7 #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tutorial/step07-navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ edit navigation.py
We'll need to import the `PluginMenuItem` class provided by NetBox to add new menu items; do this at the top of the file.

```python
from extras.plugins import PluginMenuItem
from netbox.plugins import PluginMenuItem
```

Next, we'll create a tuple named `menu_items`. This will hold our customized `PluginMenuItem` instances.
Expand Down Expand Up @@ -58,8 +58,8 @@ That's much more convenient!
While we're at it, we can add direct links to the "add" views for access lists and rules as buttons. We'll need to import two additional classes at the top of `navigation.py`: `PluginMenuButton` and `ButtonColorChoices`.

```python
from extras.plugins import PluginMenuButton, PluginMenuItem
from utilities.choices import ButtonColorChoices
from netbox.plugins import PluginMenuButton, PluginMenuItem
from extras.choices import ButtonColorChoices
```

`PluginMenuButton` is used similarly to `PluginMenuItem`: Instantiate it with the necessary keyword arguments to effect a menu button. These arguments are:
Expand Down