fixed non-working update view (since last commit)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user