reqs fix
[prawokultury.git] / questions / views.py
1 from django.core.urlresolvers import reverse_lazy
2 from django.views.generic.edit import FormView
3 from .forms import QuestionForm
4
5
6 class QuestionFormView(FormView):
7     form_class = QuestionForm
8     template_name = "questions/question_form.html"
9     success_url = reverse_lazy("questions_thanks")
10
11     def form_valid(self, form):
12         form.save()
13         return super(QuestionFormView, self).form_valid(form)