switch exam questions to a sorted m2m
This commit is contained in:
+3
-1
@@ -9,6 +9,8 @@ from django.urls import reverse
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from sortedm2m.fields import SortedManyToManyField
|
||||
|
||||
image_storage = FileSystemStorage(
|
||||
# Physical file location ROOT
|
||||
location=u"{0}/anatomy/".format(settings.MEDIA_ROOT),
|
||||
@@ -201,7 +203,7 @@ class Answer(models.Model):
|
||||
|
||||
class Exam(models.Model):
|
||||
name = models.CharField(max_length=200)
|
||||
exam_questions = models.ManyToManyField(AnatomyQuestion,
|
||||
exam_questions = SortedManyToManyField(AnatomyQuestion,
|
||||
related_name="exams", blank="true")
|
||||
|
||||
active = models.BooleanField(help_text="If an exam should be available",
|
||||
|
||||
Reference in New Issue
Block a user