.
This commit is contained in:
+2
-2
@@ -55,8 +55,8 @@ urlpatterns = [
|
||||
path("exam/json/unbased", views.active_exams_unbased, name="active_exams_unbased"),
|
||||
path("exam/submit", views.exam_submit, name="global_exam_answers_submit"),
|
||||
#path('', include('generic.urls')),
|
||||
path("feedback/<str:question_type>/<int:pk>", views.feedback_create, name="feedback_create"),
|
||||
path("feedback/", views.AddQuestionNote.as_view(), name="feedback"),
|
||||
path("feedback/<str:question_type>/<int:pk>", views.AddQuestionNote.as_view(), name="feedback_create"),
|
||||
#path("feedback/", views.AddQuestionNote.as_view(), name="feedback"),
|
||||
|
||||
|
||||
path('api/', include(router.urls)),
|
||||
|
||||
+7
-1
@@ -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
|
||||
Reference in New Issue
Block a user