15 lines
576 B
Python
15 lines
576 B
Python
from django.urls import include, path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from apps.salons.views import SalonReviewsView, SalonServicesView, SalonStaffView, SalonViewSet
|
|
|
|
router = DefaultRouter()
|
|
router.register(r"", SalonViewSet, basename="salon")
|
|
|
|
urlpatterns = [
|
|
path("", include(router.urls)),
|
|
path("<int:salon_id>/services/", SalonServicesView.as_view(), name="salon_services"),
|
|
path("<int:salon_id>/staff/", SalonStaffView.as_view(), name="salon_staff"),
|
|
path("<int:salon_id>/reviews/", SalonReviewsView.as_view(), name="salon_reviews"),
|
|
]
|