2021-08-07 19:47:34 +02:00
|
|
|
from django.urls import include, path
|
|
|
|
from rest_framework import routers
|
|
|
|
from .views import *
|
|
|
|
from django.conf.urls import url
|
|
|
|
|
|
|
|
router = routers.DefaultRouter()
|
|
|
|
router.register(r'users', UserViewSet)
|
|
|
|
router.register(r'groups', GroupViewSet)
|
|
|
|
router.register(r'parts/storages', PartsStorageViewSet)
|
2024-11-10 20:46:45 +01:00
|
|
|
router.register(r'parts/storage_templates', PartsStorageTemplatesViewSet, basename='storage-template')
|
2021-08-07 19:47:34 +02:00
|
|
|
router.register(r'parts/components', PartsComponentViewSet)
|
2024-11-17 23:28:15 +01:00
|
|
|
router.register(r'parts/component-parameters', PartsComponentParameterViewSet)
|
|
|
|
router.register(r'parts/component-distributor-numbers', PartsComponentDistributorNumViewSet)
|
2021-08-07 19:47:34 +02:00
|
|
|
router.register(r'parts/stocks', PartsStockViewSet)
|
|
|
|
router.register(r'parts/packages', PartsPackageViewSet)
|
|
|
|
router.register(r'parts/distributors', PartsDistributorviewSet)
|
2021-11-08 00:56:33 +01:00
|
|
|
router.register(r'parts/manufacturers', PartsManufacturerViewSet)
|
2021-11-11 20:51:02 +01:00
|
|
|
router.register(r'parts/component-types', PartsComponentTypeViewSet)
|
|
|
|
router.register(r'parts/component-param-types', PartsComponentParameterTypeViewSet)
|
2021-08-07 19:47:34 +02:00
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path('', include(router.urls)),
|
|
|
|
url(r'^token-auth/', ObtainExpiringAuthToken.as_view()),
|
|
|
|
url(r'^token-logout/', TokenLogout.as_view()),
|
|
|
|
]
|