@@ -53,7 +53,7 @@ class QuestionDetailView(LoginRequiredMixin, DetailView):
5353 """View to call a given Question object and to render all the details about
5454 that Question."""
5555 model = Question
56- context_object_name = ' question'
56+ context_object_name = " question"
5757
5858
5959class CreateQuestionView (LoginRequiredMixin , CreateView ):
@@ -62,15 +62,15 @@ class CreateQuestionView(LoginRequiredMixin, CreateView):
6262 """
6363 form_class = QuestionForm
6464 template_name = "qa/question_form.html"
65- message = _ (' Your question has been created.' )
65+ message = _ (" Your question has been created." )
6666
6767 def form_valid (self , form ):
6868 form .instance .user = self .request .user
6969 return super ().form_valid (form )
7070
7171 def get_success_url (self ):
7272 messages .success (self .request , self .message )
73- return reverse ("qa:index " )
73+ return reverse ("qa:index_noans " )
7474
7575
7676class CreateAnswerView (LoginRequiredMixin , CreateView ):
@@ -83,7 +83,7 @@ class CreateAnswerView(LoginRequiredMixin, CreateView):
8383
8484 def form_valid (self , form ):
8585 form .instance .user = self .request .user
86- form .instance .question_id = self .kwargs [' question_id' ]
86+ form .instance .question_id = self .kwargs [" question_id" ]
8787 return super ().form_valid (form )
8888
8989 def get_success_url (self ):
0 commit comments