Cache sass for an hour
This commit is contained in:
parent
0dc022b861
commit
430808d7fa
|
@ -6,11 +6,14 @@
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
{% load cache %}
|
||||||
|
{% 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 %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
<style>{% block style %}{% endblock %}</style>
|
<style>{% block style %}{% endblock %}</style>
|
||||||
|
|
|
@ -7,10 +7,8 @@ from .forms import RepoForm, ArchiveForm, ErrorForm, LocationForm
|
||||||
from django.contrib.auth.decorators import permission_required
|
from django.contrib.auth.decorators import permission_required
|
||||||
from .utility import data
|
from .utility import data
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from django.views.decorators.cache import cache_page
|
|
||||||
|
|
||||||
|
|
||||||
@cache_page(60)
|
|
||||||
def index(request):
|
def index(request):
|
||||||
repo_list = Repo.objects.all()
|
repo_list = Repo.objects.all()
|
||||||
location_list = Location.objects.all()
|
location_list = Location.objects.all()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user