Cache all base scripts

This commit is contained in:
George Lacey 2021-05-18 18:04:20 +01:00
parent 0ad734eb72
commit c3825efe26
2 changed files with 3 additions and 4 deletions

View File

@ -6,21 +6,21 @@
{% load static %} {% load static %}
{% load cache %} {% load cache %}
{% block script %} {% cache 3600 script %}
{% cache 3600 sass %}
<link rel="shortcut icon" href="{% static 'favicon.ico' %}"> <link rel="shortcut icon" href="{% static 'favicon.ico' %}">
{% load compress %} {% load compress %}
{% compress css %} {% compress css %}
<link type="text/x-scss" href="{% static 'theme.scss' %}" rel="stylesheet" media="screen"> <link type="text/x-scss" href="{% static 'theme.scss' %}" rel="stylesheet" media="screen">
{% endcompress %} {% endcompress %}
{% endcache %} {% endcache %}
{% block script %}
{% endblock %} {% endblock %}
<style>{% block style %}{% endblock %}</style> <style>{% block style %}{% endblock %}</style>
<title>{% block title %}Title{% endblock %}</title> <title>{% block title %}Title{% endblock %}</title>
</head> </head>
<body> <body>
{% cache 3600 navbar %} {% cache 3600 navbar %}
<nav class="navbar navbar-expand-md navbar-dark bg-secondary mb-2"> <nav class="navbar navbar-expand-md navbar-dark bg-secondary mb-2">
<div class="container-fluid"> <div class="container-fluid">

View File

@ -4,7 +4,6 @@
{% block title %}Borg Summary{% endblock %} {% block title %}Borg Summary{% endblock %}
{% block script %} {% block script %}
{{block.super}}
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
{{ hour_list|json_script:"hour_list" }} {{ hour_list|json_script:"hour_list" }}
<script src="{% static 'js/index.js' %}"></script> <script src="{% static 'js/index.js' %}"></script>