Files
chunyu_project/learn/urls.py
T
2026-08-05 23:59:15 +08:00

21 lines
1.5 KiB
Python

from django.urls import path
from . import views
urlpatterns = [
path('courses/', views.CourseListCreateView.as_view(), name='course_list_create'),
path('courses/<int:pk>/', views.CourseDetailView.as_view(), name='course_detail'),
path('courses/<int:course_id>/chapters/', views.ChapterListCreateView.as_view(), name='chapter_list_create'),
path('chapters/<int:pk>/', views.ChapterDetailView.as_view(), name='chapter_detail'),
path('chapters/<int:chapter_id>/content/', views.ChapterContentView.as_view(), name='chapter_content'),
path('my-courses/', views.MyCourseListView.as_view(), name='my_courses'),
path('my-courses/batch/', views.MyCourseBatchView.as_view(), name='my_courses_batch'),
path('cdn/<int:course_id>/chapters/<int:chapter_id>.md', views.CDNStaticFileView.as_view(), name='cdn_static_md'),
path('favorites/<int:pk>/toggle/', views.CourseFavoriteToggleView.as_view(), name='course_favorite_toggle'),
path('chapters/<int:pk>/mark-completed/', views.ChapterMarkCompletedView.as_view(), name='chapter_mark_completed'),
path('courses/<int:course_id>/progress/', views.CourseProgressView.as_view(), name='course_progress'),
path('my-progress/', views.MyProgressView.as_view(), name='my_progress'),
path('materials/', views.MaterialListView.as_view(), name='material_list'),
path('materials/<int:pk>/download/', views.MaterialDownloadView.as_view(), name='material_download'),
path('chapters/<int:pk>/video/download/', views.ChapterVideoDownloadView.as_view(), name='chapter_video_download'),
]