start taking more advantage of class based views
This commit is contained in:
@@ -224,6 +224,9 @@ class Rapid(QuestionBase):
|
||||
default=False, help_text="Question has been scrapped and will not be shown"
|
||||
)
|
||||
|
||||
def get_app_name(self):
|
||||
return "rapids"
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse("rapids:question_detail", kwargs={"pk": self.pk})
|
||||
|
||||
@@ -652,6 +655,10 @@ class Exam(ExamBase):
|
||||
|
||||
examcollection = models.ForeignKey(ExamCollection, blank=True, null=True, on_delete=models.SET_NULL, related_name="rapids_exams")
|
||||
|
||||
|
||||
def get_app_name(self):
|
||||
return "rapids"
|
||||
|
||||
def get_normal_abnormal_breakdown(self):
|
||||
# Inefficient but more extendible
|
||||
questions = self.exam_questions.all()
|
||||
|
||||
Reference in New Issue
Block a user