This commit is contained in:
Ross
2021-09-21 18:23:23 +01:00
parent e4fba3eff3
commit 9a464eb43a
7 changed files with 27 additions and 13 deletions
+6 -1
View File
@@ -35,7 +35,9 @@ from longs.models import Exam as LongExam
from anatomy.models import AnatomyQuestion as AnatomyQuestion
from anatomy.models import Exam as AnatomyExam
from sbas.models import Question as SbasQuestion
from sbas.models import Exam as SbasExam
#from sbas.models import Exam as SbasExam
from physics.models import Question as PhysicsQuestion
#from physics.models import Exam as PhysicsExam
from django.db.models import Case, When
from django.conf import settings
@@ -58,6 +60,9 @@ def get_question_and_content_type(question_type):
elif question_type == "sbas":
question = SbasQuestion
content_type = ContentType.objects.get(app_label="sbas", model="question")
elif question_type == "physics":
question = PhysicsQuestion
content_type = ContentType.objects.get(app_label="physics", model="question")
else:
raise PermissionError()