20 lines
758 B
Python
20 lines
758 B
Python
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)
|
|
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)
|
|
|
|
urlpatterns = [
|
|
path('', include(router.urls)),
|
|
url(r'^token-auth/', ObtainExpiringAuthToken.as_view()),
|
|
url(r'^token-logout/', TokenLogout.as_view()),
|
|
] |