network_inventory/backend/backups/urls.py

30 lines
903 B
Python
Raw Normal View History

2020-11-30 16:31:30 +01:00
from django.urls import path, include
from rest_framework import routers
2020-11-30 17:23:35 +01:00
from . import views
2020-11-30 16:31:30 +01:00
router = routers.DefaultRouter()
2020-11-30 17:23:35 +01:00
router.register(r'backup-method',
views.BackupMethodViewSet,
'backup-method')
router.register(r'backups', views.BackupViewSet)
router.register(r'target-devices',
views.TargetDeviceViewSet,
'target-device')
router.register(r'notification-from-backup',
views.NotificationFromBackupViewSet,
'notification-from-backup')
router.register(r'notification',
views.NotificationViewSet)
router.register(r'notification-type',
views.NotificationTypeViewSet,
'notification-types')
2020-11-30 16:31:30 +01:00
urlpatterns = [
# required for the login functionality
path('api/', include(router.urls)),
path('accounts/', include('django.contrib.auth.urls')),
]