This commit is contained in:
Ross
2021-09-13 08:48:37 +01:00
parent 4e876f76b8
commit bc91259ae4
3 changed files with 28 additions and 1 deletions
+5 -1
View File
@@ -11,10 +11,12 @@ from django.utils.translation import ugettext_lazy as _
from sortedm2m.fields import SortedManyToManyField
from generic.models import ExamBase
from generic.models import ExamBase, QuestionNote
import reversion
from django.contrib.contenttypes.fields import GenericRelation
class Category(models.Model):
category = models.CharField(max_length=200)
@@ -99,6 +101,8 @@ class Question(models.Model):
Category, on_delete=models.SET_NULL, null=True, blank=True
)
notes = GenericRelation(QuestionNote)
def __str__(self):
return self.stem