Coverage for website/education/urls.py: 100.00%
6 statements
« prev ^ index » next coverage.py v7.6.7, created at 2025-08-14 10:31 +0000
« prev ^ index » next coverage.py v7.6.7, created at 2025-08-14 10:31 +0000
1from django.conf.urls import include
2from django.urls import path
3from django.views.generic.base import RedirectView
5from education.views import (
6 BookInfoView,
7 CourseDetailView,
8 CourseIndexView,
9 ExamCreateView,
10 ExamDetailView,
11 SummaryCreateView,
12 SummaryDetailView,
13)
15app_name = "education"
17urlpatterns = [
18 path(
19 "education/",
20 include(
21 [
22 path("books/", BookInfoView.as_view(), name="books"),
23 path(
24 "courses/",
25 include(
26 [
27 path(
28 "<int:pk>/",
29 include(
30 [
31 path(
32 "exam/upload/",
33 ExamCreateView.as_view(),
34 name="submit-exam",
35 ),
36 path(
37 "summary/upload/",
38 SummaryCreateView.as_view(),
39 name="submit-summary",
40 ),
41 path(
42 "",
43 CourseDetailView.as_view(),
44 name="course",
45 ),
46 ]
47 ),
48 ),
49 path(
50 "exam/<int:pk>/", ExamDetailView.as_view(), name="exam"
51 ),
52 path(
53 "summary/<int:pk>/",
54 SummaryDetailView.as_view(),
55 name="summary",
56 ),
57 path(
58 "exam/upload/",
59 ExamCreateView.as_view(),
60 name="submit-exam",
61 ),
62 path(
63 "summary/upload/",
64 SummaryCreateView.as_view(),
65 name="submit-summary",
66 ),
67 path("", CourseIndexView.as_view(), name="courses"),
68 ]
69 ),
70 ),
71 path(
72 "",
73 RedirectView.as_view(
74 pattern_name="education:courses", permanent=True
75 ),
76 name="index",
77 ),
78 ]
79 ),
80 ),
81]