start taking more advantage of class based views
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user