38 lines
1.5 KiB
Python
38 lines
1.5 KiB
Python
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.CompanyFolderCrudViewSet, "contract-owner-files") # type: ignore
|
|
|
|
urlpatterns = [ # type: ignore
|
|
path("", include(router.urls)), # type: ignore
|
|
path(
|
|
r"contract-owners/<uuid:owner_id>/contract",
|
|
views.ContractDetailView.as_view(),
|
|
name="contract-detail"
|
|
),
|
|
path(
|
|
"contract-owners/<uuid:owner_id>/files/<uuid:file_id>",
|
|
views.ContractAttachedFileDeleteView.as_view(),
|
|
name="contract-file-delete"
|
|
),
|
|
path(
|
|
r"contract-owners/<uuid:owner_id>/files/<uuid:file_id>/upload",
|
|
views.UploadFileContentView.as_view(),
|
|
name="upload-file-content"
|
|
),
|
|
path(
|
|
r"folders/<uuid:pk>/contracts",
|
|
views.ListFolderContractsView.as_view(),
|
|
name="list-folder-contracts"
|
|
)
|
|
]
|