mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #4997: Introduce OrderedDefaultRouter; move root API views to views.py
This commit is contained in:
@@ -11,6 +11,7 @@ from drf_yasg.utils import swagger_auto_schema
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.mixins import ListModelMixin
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.routers import APIRootView
|
||||
from rest_framework.viewsets import GenericViewSet, ViewSet
|
||||
|
||||
from circuits.models import Circuit
|
||||
@@ -36,6 +37,14 @@ from . import serializers
|
||||
from .exceptions import MissingFilterException
|
||||
|
||||
|
||||
class DCIMRootView(APIRootView):
|
||||
"""
|
||||
DCIM API root view
|
||||
"""
|
||||
def get_view_name(self):
|
||||
return 'DCIM'
|
||||
|
||||
|
||||
# Mixins
|
||||
|
||||
class CableTraceMixin(object):
|
||||
|
||||
Reference in New Issue
Block a user