62 lines
1.7 KiB
Python
62 lines
1.7 KiB
Python
from django.urls import path, include
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
# SchoolYears
|
|
path('years/', include([
|
|
path(
|
|
'',
|
|
views.SchoolYearListView.as_view(),
|
|
name='schoolyear-list'
|
|
),
|
|
path(
|
|
'new/',
|
|
views.SchoolYearCreateView.as_view(),
|
|
name='schoolyear-create'
|
|
),
|
|
path('<slug:year>/', include([
|
|
path(
|
|
'',
|
|
views.SchoolYearDetailView.as_view(),
|
|
name='schoolyear-detail'
|
|
),
|
|
path(
|
|
'update/',
|
|
views.SchoolYearUpdateView.as_view(),
|
|
name='schoolyear-update'
|
|
),
|
|
|
|
# Students
|
|
path('students/', include([
|
|
path(
|
|
'',
|
|
views.StudentListView.as_view(),
|
|
name='student-list'
|
|
),
|
|
path(
|
|
'new/',
|
|
views.StudentCreateView.as_view(),
|
|
name='student-create'
|
|
),
|
|
path('<int:student_pk>/', include([
|
|
path(
|
|
'',
|
|
views.StudentDetailView.as_view(),
|
|
name='student-detail'
|
|
),
|
|
path(
|
|
'update/',
|
|
views.StudentUpdateView.as_view(),
|
|
name='student-update'
|
|
),
|
|
path(
|
|
'delete/',
|
|
views.StudentDeleteView.as_view(),
|
|
name='student-delete'
|
|
),
|
|
])),
|
|
])),
|
|
])),
|
|
])),
|
|
]
|