32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
from django.urls import include, path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from .views import (
|
|
AccountViewSet,
|
|
CompanySettingsView,
|
|
EmployeeViewSet,
|
|
InvoiceViewSet,
|
|
PartyViewSet,
|
|
PayslipViewSet,
|
|
ProductViewSet,
|
|
TreasuryTxnViewSet,
|
|
VoucherViewSet,
|
|
reset_accounting_data,
|
|
)
|
|
|
|
router = DefaultRouter()
|
|
router.register(r'accounts', AccountViewSet, basename='accounting-account')
|
|
router.register(r'parties', PartyViewSet, basename='accounting-party')
|
|
router.register(r'products', ProductViewSet, basename='accounting-product')
|
|
router.register(r'vouchers', VoucherViewSet, basename='accounting-voucher')
|
|
router.register(r'invoices', InvoiceViewSet, basename='accounting-invoice')
|
|
router.register(r'treasury', TreasuryTxnViewSet, basename='accounting-treasury')
|
|
router.register(r'employees', EmployeeViewSet, basename='accounting-employee')
|
|
router.register(r'payslips', PayslipViewSet, basename='accounting-payslip')
|
|
|
|
urlpatterns = [
|
|
path('', include(router.urls)),
|
|
path('settings/', CompanySettingsView.as_view(), name='accounting-settings'),
|
|
path('reset/', reset_accounting_data, name='accounting-reset'),
|
|
]
|