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

34 lines
710 B
Python
Raw Normal View History

2017-03-08 16:12:14 -05:00
from rest_framework import routers
from . import views
2017-03-20 21:50:10 -04:00
class ExtrasRootView(routers.APIRootView):
"""
Extras API root view
"""
def get_view_name(self):
return 'Extras'
2017-03-08 16:12:14 -05:00
router = routers.DefaultRouter()
2017-03-20 21:50:10 -04:00
router.APIRootView = ExtrasRootView
2017-03-08 16:12:14 -05:00
2017-03-20 15:14:33 -04:00
# Graphs
router.register(r'graphs', views.GraphViewSet)
# Export templates
router.register(r'export-templates', views.ExportTemplateViewSet)
2017-03-09 13:24:02 -05:00
# Topology maps
2017-03-08 16:12:14 -05:00
router.register(r'topology-maps', views.TopologyMapViewSet)
# Image attachments
router.register(r'image-attachments', views.ImageAttachmentViewSet)
# Recent activity
router.register(r'recent-activity', views.RecentActivityViewSet)
app_name = 'extras-api'
2017-03-09 13:24:02 -05:00
urlpatterns = router.urls