fixed WebsiteProtectedWithAjaxMixin template response

This commit is contained in:
artus
2016-08-06 10:42:19 +02:00
parent d155d87781
commit f3dd74d367
3 changed files with 25 additions and 17 deletions

View File

@@ -43,13 +43,14 @@ class SujetCreateForm(ModelForm):
class SujetCreateView(SujetsView, generic.edit.CreateView, views.AjaxTemplateMixin):
class SujetCreateView(views.WebsiteProtectedWithAjaxMixin, generic.edit.CreateView):
template_name = "sujets/sujet_create.html"
form_class = SujetCreateForm
title = "Création : Sujet"
header = "Ajouter un sujet"
permissions = ['sujets.view_sujets', 'sujets.add_sujet']
def post(self, request, *args, **kwargs):
if 'next' in self.request.POST: