This commit is contained in:
Ross
2021-09-21 18:30:16 +01:00
parent 497d7e2d23
commit 5536f65a55
+5
View File
@@ -212,6 +212,11 @@ class AddQuestionNote(CreateView):
return { "content_type" : content_type, return { "content_type" : content_type,
"object_id" : pk } "object_id" : pk }
def get_context_data(self, **kwargs):
context = super(AddQuestionNote, self).get_context_data(**kwargs)
context['question'] = self.question
return context
def form_valid(self, form): def form_valid(self, form):
model = form.save(commit=False) model = form.save(commit=False)