From e3fbde8e3997b4edf8c575e5abe957e772dadc12 Mon Sep 17 00:00:00 2001 From: Ross Date: Thu, 9 Sep 2021 19:05:00 +0100 Subject: [PATCH] . --- generic/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/views.py b/generic/views.py index 0243cee7..fb738097 100644 --- a/generic/views.py +++ b/generic/views.py @@ -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()