Split graph/import/meta into Django apps, add API v1 with OpenAPI and pytest, and introduce plugin registry with the tags reference plugin on both FE and BE. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
from django.urls import path, include
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from contacts import views as contact_views
|
|
|
|
router = DefaultRouter()
|
|
router.register('contacts', contact_views.ContactViewSet)
|
|
router.register('relations', contact_views.RelationViewSet)
|
|
router.register('network-maps', contact_views.NetworkMapViewSet)
|
|
|
|
urlpatterns = [
|
|
path('', include(router.urls)),
|
|
path(
|
|
'network-maps/<int:map_pk>/memberships/',
|
|
contact_views.NetworkMapMembershipViewSet.as_view({'get': 'list', 'post': 'create'}),
|
|
name='network-map-memberships-list',
|
|
),
|
|
path(
|
|
'network-maps/<int:map_pk>/memberships/<int:pk>/',
|
|
contact_views.NetworkMapMembershipViewSet.as_view({
|
|
'get': 'retrieve',
|
|
'patch': 'partial_update',
|
|
'put': 'update',
|
|
'delete': 'destroy',
|
|
}),
|
|
name='network-map-memberships-detail',
|
|
),
|
|
path('', include('core.urls')),
|
|
path('', include('graph.urls')),
|
|
path('', include('import_export.urls')),
|
|
path('', include('plugins.urls')),
|
|
]
|