27 lines
770 B
Python
27 lines
770 B
Python
"""partner URL。"""
|
|
|
|
from django.urls import path, include
|
|
from adrf.routers import DefaultRouter as ADRouter
|
|
from .views import (
|
|
PriceLevelViewSet,
|
|
ContactViewSet,
|
|
CustomerViewSet,
|
|
SupplierViewSet,
|
|
credit_usage_view,
|
|
price_quote,
|
|
)
|
|
|
|
|
|
router = ADRouter()
|
|
router.register("price-levels", PriceLevelViewSet, basename="price-level")
|
|
router.register("contacts", ContactViewSet, basename="contact")
|
|
router.register("customers", CustomerViewSet, basename="customer")
|
|
router.register("suppliers", SupplierViewSet, basename="supplier")
|
|
|
|
|
|
urlpatterns = [
|
|
path("price-quote/", price_quote, name="partner-price-quote"),
|
|
path("credit-usage/<int:customer_id>/", credit_usage_view, name="partner-credit-usage"),
|
|
path("", include(router.urls)),
|
|
]
|