start taking more advantage of class based views

This commit is contained in:
Ross
2024-03-11 11:08:35 +00:00
parent 78e4ed871e
commit 0cb38f5c31
27 changed files with 244 additions and 104 deletions
+6
View File
@@ -127,6 +127,9 @@ class AnatomyQuestion(QuestionBase):
class Meta:
permissions = ()
def get_app_name(self):
return "anatomy"
def __str__(self):
# Get first answer
return "{}/{}: {} [{}, {}]".format(
@@ -410,6 +413,9 @@ class Exam(ExamBase):
examcollection = models.ForeignKey(ExamCollection, blank=True, null=True, on_delete=models.SET_NULL, related_name="anatomy_exams")
def get_app_name(self):
return "anatomy"
def get_exam_json(self, based=True):
questions = self.get_questions()