Files
netbox/netbox/core/urls.py
Martin Hauser 945e7ade0a Fixes #21407: Enable I (isort) and stabilize import ordering (#21458)
- Adopt Ruff `I` (isort) rules for consistent import sorting
- Add two `# isort: split` boundaries to keep required imports pinned
  in `__init__.py` modules
2026-02-18 10:41:51 -06:00

57 lines
2.3 KiB
Python

from django.urls import include, path
from utilities.urls import get_model_urls
from . import views
app_name = 'core'
urlpatterns = (
path('data-sources/', include(get_model_urls('core', 'datasource', detail=False))),
path('data-sources/<int:pk>/', include(get_model_urls('core', 'datasource'))),
path('data-files/', include(get_model_urls('core', 'datafile', detail=False))),
path('data-files/<int:pk>/', include(get_model_urls('core', 'datafile'))),
path('jobs/', include(get_model_urls('core', 'job', detail=False))),
path('jobs/<int:pk>/', include(get_model_urls('core', 'job'))),
path('changelog/', include(get_model_urls('core', 'objectchange', detail=False))),
path('changelog/<int:pk>/', include(get_model_urls('core', 'objectchange'))),
# Background Tasks
path('background-queues/', views.BackgroundQueueListView.as_view(), name='background_queue_list'),
path(
'background-queues/<int:queue_index>/<str:status>/',
views.BackgroundTaskListView.as_view(),
name='background_task_list'
),
path('background-tasks/<str:job_id>/', views.BackgroundTaskView.as_view(), name='background_task'),
path(
'background-tasks/<str:job_id>/delete/',
views.BackgroundTaskDeleteView.as_view(),
name='background_task_delete'
),
path(
'background-tasks/<str:job_id>/requeue/',
views.BackgroundTaskRequeueView.as_view(),
name='background_task_requeue'
),
path(
'background-tasks/<str:job_id>/enqueue/',
views.BackgroundTaskEnqueueView.as_view(),
name='background_task_enqueue'
),
path('background-tasks/<str:job_id>/stop/', views.BackgroundTaskStopView.as_view(), name='background_task_stop'),
path('background-workers/<int:queue_index>/', views.WorkerListView.as_view(), name='worker_list'),
path('background-workers/<str:key>/', views.WorkerView.as_view(), name='worker'),
path('config-revisions/', include(get_model_urls('core', 'configrevision', detail=False))),
path('config-revisions/<int:pk>/', include(get_model_urls('core', 'configrevision'))),
path('system/', views.SystemView.as_view(), name='system'),
path('plugins/', views.PluginListView.as_view(), name='plugin_list'),
path('plugins/<str:name>/', views.PluginView.as_view(), name='plugin'),
)