.
This commit is contained in:
+6
-1
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user