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 18:47:59 +01:00
|
|
|
router.register(r'backup-methods',
|
2020-11-30 17:23:35 +01:00
|
|
|
views.BackupMethodViewSet,
|
|
|
|
'backup-method')
|
|
|
|
router.register(r'backups', views.BackupViewSet)
|
|
|
|
router.register(r'target-devices',
|
|
|
|
views.TargetDeviceViewSet,
|
|
|
|
'target-device')
|
2020-11-30 18:47:59 +01:00
|
|
|
router.register(r'notifications-from-backup',
|
2020-11-30 17:23:35 +01:00
|
|
|
views.NotificationFromBackupViewSet,
|
|
|
|
'notification-from-backup')
|
2020-11-30 18:47:59 +01:00
|
|
|
router.register(r'notifications',
|
2020-11-30 17:23:35 +01:00
|
|
|
views.NotificationViewSet)
|
2020-11-30 18:47:59 +01:00
|
|
|
router.register(r'notifications-type',
|
2020-11-30 17:23:35 +01:00
|
|
|
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')),
|
|
|
|
]
|