shimatta-kenkyusho/shimatta_kenkyusho/api/urls.py

21 lines
898 B
Python
Raw Normal View History

2023-09-04 21:33:34 +02:00
from django.urls import include, path, re_path
2021-08-07 19:47:34 +02:00
from rest_framework import routers
from .views import *
router = routers.DefaultRouter()
router.register(r'users', UserViewSet)
router.register(r'groups', GroupViewSet)
router.register(r'parts/storages', PartsStorageViewSet)
router.register(r'parts/components', PartsComponentViewSet)
router.register(r'parts/stocks', PartsStockViewSet)
router.register(r'parts/packages', PartsPackageViewSet)
router.register(r'parts/distributors', PartsDistributorviewSet)
router.register(r'parts/manufacturers', PartsManufacturerViewSet)
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)),
2023-09-04 21:33:34 +02:00
re_path(r'^token-auth/', ObtainExpiringAuthToken.as_view()),
re_path(r'^token-logout/', TokenLogout.as_view()),
2021-08-07 19:47:34 +02:00
]