1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Rename OrderedDefaultRouter to NetBoxRouter & document for plugins

This commit is contained in:
jeremystretch
2022-03-11 15:59:03 -05:00
parent 6d05a4117a
commit 59aba52b03
11 changed files with 28 additions and 26 deletions

View File

@ -70,10 +70,10 @@ Routers should be exposed in `api/urls.py`. This file **must** define a variable
```python
# api/urls.py
from rest_framework import routers
from netbox.api.routers import NetBoxRouter
from .views import MyModelViewSet
router = routers.DefaultRouter()
router = NetBoxRouter()
router.register('my-model', MyModelViewSet)
urlpatterns = router.urls
```