from django.urls import include, path from rest_framework.routers import DefaultRouter from .views import ( CategoryListView, InstructorCourseViewSet, InstructorFAQViewSet, InstructorHighlightViewSet, InstructorLessonViewSet, InstructorSectionViewSet, PublicCourseDetailView, PublicCourseListView, ) instructor_router = DefaultRouter() instructor_router.register(r"courses", InstructorCourseViewSet, basename="instructor-course") instructor_router.register(r"sections", InstructorSectionViewSet, basename="instructor-section") instructor_router.register(r"lessons", InstructorLessonViewSet, basename="instructor-lesson") instructor_router.register(r"highlights", InstructorHighlightViewSet, basename="instructor-highlight") instructor_router.register(r"faqs", InstructorFAQViewSet, basename="instructor-faq") urlpatterns = [ # public path("categories/", CategoryListView.as_view(), name="categories"), path("courses/", PublicCourseListView.as_view(), name="public-courses"), path("courses//", PublicCourseDetailView.as_view(), name="public-course-detail"), # instructor surface path("instructor/", include((instructor_router.urls, "instructor"))), ]