from django.urls import path, include from rest_framework.routers import DefaultRouter # type: ignore from . import views router = DefaultRouter() router.register(r"contract-attached-files", views.ContractAttachedFileView, "contract-attached-files") # type: ignore router.register(r"contracts", views.ContractView, "contracts") # type: ignore router.register(r"contracts", views.ContractRelationsViewSet, "contract-relations") # type: ignore router.register(r"contract-file-contents", views.ContractFileContentView, "contract-file-contents") # type: ignore router.register(r"contract-owners", views.ContractOwnerView, "contract-owners") # type: ignore router.register(r"contract-owners", views.ContractOwnerFileViewSet, "contract-owner-files") # type: ignore urlpatterns = [ # type: ignore path("", include(router.urls)), # type: ignore path( r"contract-owners//contract", views.ContractDetailView.as_view(), name="contract-detail" ), path( "contract-owners//files/", views.ContractAttachedFileDeleteView.as_view(), name="contract-file-delete" ), path( r"contract-owners//files//upload", views.UploadFileContentView.as_view(), name="upload-file-content" ), path( r"folders//contracts", views.ListFolderContractsView.as_view(), name="list-folder-contracts" ) ]