.
This commit is contained in:
+3
-2
@@ -1,3 +1,4 @@
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.shortcuts import render, get_object_or_404, redirect
|
||||
|
||||
from django.contrib.auth.decorators import login_required, user_passes_test
|
||||
@@ -43,13 +44,13 @@ import os
|
||||
|
||||
def get_question_and_content_type(question_type):
|
||||
if question_type == "rapid":
|
||||
question = Rapid
|
||||
question = RapidQuestion
|
||||
content_type = ContentType.objects.get(model="rapid")
|
||||
elif question_type == "anatomy":
|
||||
question = AnatomyQuestion
|
||||
content_type = ContentType.objects.get(model="anatomyquestion")
|
||||
elif question_type == "long":
|
||||
question = Long
|
||||
question = LongQuestion
|
||||
content_type = ContentType.objects.get(model="long")
|
||||
else:
|
||||
raise PermissionError()
|
||||
|
||||
Reference in New Issue
Block a user