from rest_framework.routers import DefaultRouter from django.urls import path from .views import ( CraneViewSet, VehicleViewSet, WorkOrderViewSet, VehicleServiceRecordViewSet, WorkOrderInvoiceViewSet, ServiceContextNoteViewSet, VehicleNotificationViewSet, VehicleServicePhotoViewSet, VehicleServiceAttachmentViewSet, pusher_auth, monthly_servicer_report_docx, monthly_costs_report_docx, ) router = DefaultRouter() router.register(r'vehicles', VehicleViewSet, basename='vehicle') router.register(r'cranes', CraneViewSet, basename='crane') router.register(r'work-orders', WorkOrderViewSet, basename='workorder') router.register(r'work-order-invoices', WorkOrderInvoiceViewSet, basename='work-order-invoice') router.register(r'service-notes', ServiceContextNoteViewSet, basename='service-context-note') router.register(r'service-records', VehicleServiceRecordViewSet, basename='service-record') router.register(r'notifications', VehicleNotificationViewSet, basename='vehicle-notification') router.register(r'service-photos', VehicleServicePhotoViewSet, basename='service-photo') router.register(r'service-attachments', VehicleServiceAttachmentViewSet, basename='service-attachment') urlpatterns = router.urls urlpatterns += [ path('pusher-auth/', pusher_auth, name='pusher-auth'), path('reports/monthly-servicer/', monthly_servicer_report_docx, name='monthly-servicer-report'), path('reports/monthly-costs/', monthly_costs_report_docx, name='monthly-costs-report'), ]