fixed non-working update view (since last commit)

This commit is contained in:
artus40
2017-08-19 18:15:53 +02:00
parent 0bf2d9ff79
commit 67a04f1c18

View File

@@ -148,7 +148,7 @@ class FrequentationChartsView(MultipleChartsView):
# AjaxMixin # AjaxMixin
class AjaxOrRedirectMixin(generic.DetailView): class AjaxOrRedirectMixin(object):
""" For view that should be retrieved by Ajax only. If not, """ For view that should be retrieved by Ajax only. If not,
redirects to the primary view where these are displayed """ redirects to the primary view where these are displayed """
@@ -159,13 +159,13 @@ class AjaxOrRedirectMixin(generic.DetailView):
return super().get(*args, **kwargs) return super().get(*args, **kwargs)
class StatistiquesDetailsView(AjaxOrRedirectMixin): class StatistiquesDetailsView(AjaxOrRedirectMixin, generic.DetailView):
model = FicheStatistique model = FicheStatistique
template_name = "statistiques/fiche_stats_details.html" template_name = "statistiques/fiche_stats_details.html"
class StatistiquesUpdateView(AjaxOrRedirectMixin): class StatistiquesUpdateView(AjaxOrRedirectMixin, generic.UpdateView):
model = FicheStatistique model = FicheStatistique
form_class = StatistiquesForm form_class = StatistiquesForm