From 448d3793157e5d09aff80f4bdbd5cae5740fc757 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby <comby@crans.org> Date: Tue, 18 Aug 2020 11:45:30 +0200 Subject: [PATCH] no need to disable turbolinks if we don't use select2 --- apps/note/views.py | 3 --- apps/treasury/views.py | 2 -- note_kfet/templates/base.html | 6 ------ 3 files changed, 11 deletions(-) diff --git a/apps/note/views.py b/apps/note/views.py index 0312f11f..6aadb4ab 100644 --- a/apps/note/views.py +++ b/apps/note/views.py @@ -188,9 +188,6 @@ class ConsoView(ProtectQuerysetMixin, LoginRequiredMixin, SingleTableView): ).order_by('name').all() context['polymorphic_ctype'] = ContentType.objects.get_for_model(RecurrentTransaction).pk - # select2 compatibility - context['no_cache'] = True - return context diff --git a/apps/treasury/views.py b/apps/treasury/views.py index 480ed290..c2265289 100644 --- a/apps/treasury/views.py +++ b/apps/treasury/views.py @@ -57,7 +57,6 @@ class InvoiceCreateView(ProtectQuerysetMixin, ProtectedCreateView): form_set = ProductFormSet(instance=form.instance) context['formset'] = form_set context['helper'] = ProductFormSetHelper() - context['no_cache'] = True return context @@ -125,7 +124,6 @@ class InvoiceUpdateView(ProtectQuerysetMixin, LoginRequiredMixin, UpdateView): form_set = ProductFormSet(instance=self.object) context['formset'] = form_set context['helper'] = ProductFormSetHelper() - context['no_cache'] = True if self.object.locked: for field_name in form.fields: diff --git a/note_kfet/templates/base.html b/note_kfet/templates/base.html index 671661e3..52c48b1b 100644 --- a/note_kfet/templates/base.html +++ b/note_kfet/templates/base.html @@ -22,12 +22,6 @@ SPDX-License-Identifier: GPL-3.0-or-later <meta name="msapplication-TileColor" content="#da532c"> <meta name="msapplication-config" content="{% static "favicon/browserconfig.xml" %}"> <meta name="theme-color" content="#ffffff"> - - {# Disable turbolink cache for some pages #} - {% if no_cache %} - <meta name="turbolinks-cache-control" content="no-cache"> - {% endif %} - {# Bootstrap CSS #} <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" -- GitLab