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

25 lines
483 B
Python

from __future__ import unicode_literals
from rest_framework import routers
from . import views
class TenancyRootView(routers.APIRootView):
"""
Tenancy API root view
"""
def get_view_name(self):
return 'Tenancy'
router = routers.DefaultRouter()
router.APIRootView = TenancyRootView
# Tenants
router.register(r'tenant-groups', views.TenantGroupViewSet)
router.register(r'tenants', views.TenantViewSet)
app_name = 'tenancy-api'
urlpatterns = router.urls