From 430808d7fafea475bb72376cf8f09321464ec235 Mon Sep 17 00:00:00 2001 From: George Lacey Date: Tue, 18 May 2021 17:00:56 +0100 Subject: [PATCH] Cache sass for an hour --- borgweb/borg/templates/borg/base.html | 3 +++ borgweb/borg/views.py | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/borgweb/borg/templates/borg/base.html b/borgweb/borg/templates/borg/base.html index 480511a..dac08c4 100644 --- a/borgweb/borg/templates/borg/base.html +++ b/borgweb/borg/templates/borg/base.html @@ -6,11 +6,14 @@ {% block script %} {% load static %} + {% load cache %} + {% cache 3600 sass %} {% load compress %} {% compress css %} {% endcompress %} + {% endcache %} {% endblock %} diff --git a/borgweb/borg/views.py b/borgweb/borg/views.py index f2bac2f..8eb6067 100644 --- a/borgweb/borg/views.py +++ b/borgweb/borg/views.py @@ -7,10 +7,8 @@ from .forms import RepoForm, ArchiveForm, ErrorForm, LocationForm from django.contrib.auth.decorators import permission_required from .utility import data from datetime import datetime, timedelta -from django.views.decorators.cache import cache_page -@cache_page(60) def index(request): repo_list = Repo.objects.all() location_list = Location.objects.all()