summaryrefslogtreecommitdiff
path: root/procurement/urls.py
blob: be721ae8ff9b2b91f7942343c3dc79e7f3e49527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from django.urls import path
from procurement.views import ComponentSearchView, SupplierSearchView, DocumentationView
from procurement.api import ComponentAPIList, ComponentAPIRetrieve, SupplierAPIList, SupplierAPIRetrieve, SupplierAPIComponents

urlpatterns = [
    path('', ComponentSearchView.as_view(), name='component-search'),
    path('suppliers', SupplierSearchView.as_view(), name='supplier-search'),
    path('documentation', DocumentationView.as_view(), name='documentation'),

    # API Urls
    path('api/components/', ComponentAPIList.as_view(), name='api-component-list'),
    path('api/components/<int:pk>/', ComponentAPIRetrieve.as_view(), name='api-component-retrieve'),
    path('api/suppliers/', SupplierAPIList.as_view(), name='api-supplier-list'),
    path('api/suppliers/<int:pk>/', SupplierAPIRetrieve.as_view(), name='api-supplier-retrieve'),
    path('api/suppliers/<int:pk>/components', SupplierAPIComponents.as_view(), name='api-supplier-components'),
]