25 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Python
		
	
	
	
| from django.db.models import base
 | |
| from rest_framework import urlpatterns
 | |
| from django.urls import path, include
 | |
| from rest_framework.routers import DefaultRouter
 | |
| 
 | |
| from apps.wpm.views import CuttingListViewSet, OperationEquipViewSet, OperationMaterialInputViewSet, OperationMaterialOutputViewSet, OperationMaterialToolViewSet, OperationRecordViewSet, OperationViewSet, OperationWproductViewSet, WMaterialViewSet, WPlanViewSet, WProductViewSet, WproductTicketViewSet
 | |
| 
 | |
| router = DefaultRouter()
 | |
| router.register('wmaterial', WMaterialViewSet, basename='wmaterial')
 | |
| router.register('wproduct', WProductViewSet, basename='wproduct')
 | |
| router.register('wproduct_ticket', WproductTicketViewSet, basename='wproduct_ticket')
 | |
| router.register('operation', OperationViewSet, basename='operation')
 | |
| router.register('operation_wproduct', OperationWproductViewSet, basename='operation_wproduct')
 | |
| router.register('operation_equip', OperationEquipViewSet, basename='operation_equip')
 | |
| router.register('operation_record', OperationRecordViewSet, basename='operation_record')
 | |
| router.register('operation_input', OperationMaterialInputViewSet, basename='operation_input')
 | |
| router.register('operation_output', OperationMaterialOutputViewSet, basename='operation_output')
 | |
| router.register('operation_tool', OperationMaterialToolViewSet, basename='operation_tool')
 | |
| router.register('subplan', WPlanViewSet, basename='wplan')
 | |
| router.register('cutting_list', CuttingListViewSet, basename='cutting_list')
 | |
| urlpatterns = [
 | |
|     path('', include(router.urls)),
 | |
| ]
 | |
| 
 |