From 7be9250e0fd66a1e0a4bf55b3ea8af043648ba1f Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 21 Sep 2021 18:36:58 +0100 Subject: [PATCH] . --- generic/templates/generic/questionnote_form.html | 3 +-- rad/views.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/templates/generic/questionnote_form.html b/generic/templates/generic/questionnote_form.html index d01705e6..4660c92a 100755 --- a/generic/templates/generic/questionnote_form.html +++ b/generic/templates/generic/questionnote_form.html @@ -3,11 +3,10 @@ {% block content %}

Add Feedback

+Adding feedback for {{question_type}} question - {{question}}
{% csrf_token %} {{ form.non_field_errors }} -{{question}} -{{question.pk}} {% if user.is_authenticated %} User: {{user}} diff --git a/rad/views.py b/rad/views.py index 2d041b13..fe26ef79 100644 --- a/rad/views.py +++ b/rad/views.py @@ -204,9 +204,9 @@ class AddQuestionNote(CreateView): def get_initial(self): pk = self.kwargs["pk"] - question_type = self.kwargs["question_type"] + self.question_type = self.kwargs["question_type"] - question, content_type = get_question_and_content_type(question_type) + question, content_type = get_question_and_content_type(self.question_type) self.question = get_object_or_404(question, pk=pk) return { "content_type" : content_type, @@ -216,6 +216,7 @@ class AddQuestionNote(CreateView): # This can also be accessed via view.**** in the template context = super(AddQuestionNote, self).get_context_data(**kwargs) context['question'] = self.question + context['question_type'] = self.question_type return context def form_valid(self, form):