This commit is contained in:
Ross
2021-05-04 23:27:35 +01:00
parent 59ae57d7f0
commit a7826c003b
3 changed files with 38 additions and 4 deletions
+7 -1
View File
@@ -160,4 +160,10 @@ def feedback_create(request, question_type, pk):
class AddQuestionNote(LoginRequiredMixin, CreateView):
model = QuestionNote
form_class = QuestionNoteForm
form_class = QuestionNoteForm
def get_form_kwargs(self):
kwargs = super(AddQuestionNote, self).get_form_kwargs()
# update the kwargs for the form init method with yours
kwargs.update(self.kwargs) # self.kwargs contains all url conf params
return kwargs