Files
penracourses/anatomy/urls.py
T
2023-05-15 11:12:52 +01:00

95 lines
3.2 KiB
Python

from django.urls import path, include
from anatomy.models import Structure
from generic.urls import generic_exam_urls, generic_view_urls
from . import views
from django.views.decorators.cache import cache_page
app_name = "anatomy"
urlpatterns = [
# path('', views.question_list, name='question_list'),
path(
"question/",
views.AnatomyQuestionView.as_view(),
name="question_list",
),
path(
"question/create/",
views.AnatomyQuestionCreate.as_view(),
name="anatomy_question_create",
),
path(
"create/exam/<int:pk>",
views.AnatomyQuestionCreate.as_view(),
name="anatomy_create_exam",
),
path(
"question/<int:pk>/update",
views.AnatomyQuestionUpdate.as_view(),
name="anatomy_question_update",
),
path(
"question/<int:pk>/save_annotation",
views.question_save_annotation,
name="question_save_annotation",
),
path("question/<int:pk>/answer/", views.answer_question, name="answer_question"),
path(
"question/<int:pk>/clone", views.QuestionClone.as_view(), name="question_clone"
),
path(
"question/<int:pk>/delete",
views.QuestionDelete.as_view(),
name="question_delete",
),
path("exam/<int:exam_pk>/<int:sk>/mark", views.mark, name="mark"),
path("exam/<int:exam_pk>/<int:sk>/mark/all", views.mark_all, name="mark_all"),
path(
"exam/<int:exam_pk>/<int:sk>/mark/review", views.mark_review, name="mark_review"
),
path("exam/<int:pk>/authors", views.ExamAuthorUpdate.as_view(), name="exam_authors"),
path("exam/create", views.ExamCreate.as_view(), name="exam_create"),
path("exam/<int:exam_id>/clone", views.ExamClone.as_view(), name="exam_clone"),
path("exam/<int:pk>/update", views.ExamUpdate.as_view(), name="exam_update"),
path("exam/<int:pk>/delete", views.ExamDelete.as_view(), name="exam_delete"),
path("body_part/create/", views.create_body_part, name="create_body_part"),
path(
"body_part/ajax/get_body_part_id",
views.get_body_part_id,
name="get_body_part_id",
),
path("structure/create/", views.create_structure, name="create_structure"),
path(
"structure/ajax/get_structure_id",
views.get_structure_id,
name="get_structure_id",
),
path("examination/create/", views.create_examination, name="create_examination"),
path(
"examination/ajax/get_examination_id",
views.get_examination_id,
name="get_examination_id",
),
path(
"user_answers/",
views.CidUserAnswerTableView.as_view(),
name="user_answer_table_view",
),
path(
"user_answers/<int:pk>", views.CidUserAnswerView.as_view(), name="user_answer_view"
),
path(
"user_answers/<int:pk>/delete",
views.CidUserAnswerDelete.as_view(),
name="user_answer_delete",
),
path(
"structure-autocomplete",
views.StructureAutocomplete.as_view(model=Structure, create_field="structure"),
name="structure-autocomplete",
),
]
urlpatterns.extend(generic_view_urls(views.GenericViews))
urlpatterns.extend(generic_exam_urls(views.GenericExamViews))