-
Notifications
You must be signed in to change notification settings - Fork 843
Expand file tree
/
Copy pathurls_rpc.py
More file actions
52 lines (47 loc) · 1.66 KB
/
Copy pathurls_rpc.py
File metadata and controls
52 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright The IETF Trust 2023-2026, All Rights Reserved
from django.urls import include, path
from ietf.api import views_rpc
from ietf.api.routers import PrefixedDefaultRouter
from ietf.utils.urls import url
router = PrefixedDefaultRouter(use_regex_path=False, name_prefix="ietf.api.purple_api")
router.include_format_suffixes = False
router.register(r"draft", views_rpc.DraftViewSet, basename="draft")
router.register(r"person", views_rpc.PersonViewSet)
router.register(r"rfc", views_rpc.RfcViewSet, basename="rfc")
router.register(
r"rfc/<int:rfc_number>/authors",
views_rpc.RfcAuthorViewSet,
basename="rfc-authors",
)
urlpatterns = [
url(r"^doc/drafts_by_names/", views_rpc.DraftsByNamesView.as_view()),
url(r"^persons/search/", views_rpc.RpcPersonSearch.as_view()),
path(
r"rfc/publish/",
views_rpc.RfcPubNotificationView.as_view(),
name="ietf.api.purple_api.notify_rfc_published",
),
path(
r"rfc/publish/files/",
views_rpc.RfcPubFilesView.as_view(),
name="ietf.api.purple_api.upload_rfc_files",
),
path(
r"rfc_index/refresh/",
views_rpc.RfcIndexView.as_view(),
name="ietf.api.purple_api.refresh_rfc_index",
),
path(r"subject/<str:subject_id>/person/", views_rpc.SubjectPersonView.as_view()),
path(
r"queue/process/",
views_rpc.ProcessRpcQueueView.as_view(),
name="ietf.api.purple_api.process_rpc_queue",
),
]
# add routers at the end so individual routes can steal parts of their address
# space (e.g., ^rfc/publish/ superseding the ^rfc/ routes of RfcViewSet)
urlpatterns.extend(
[
path("", include(router.urls)),
]
)