summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyc/settings.py7
-rw-r--r--pyc/templates/base.html3
2 files changed, 10 insertions, 0 deletions
diff --git a/pyc/settings.py b/pyc/settings.py
index 5a903e7..4cef68b 100644
--- a/pyc/settings.py
+++ b/pyc/settings.py
@@ -157,3 +157,10 @@ LOGGING = {
},
}
}
+
+CACHES = {
+ 'default': {
+ 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
+ 'TIMEOUT': 60,
+ }
+ }
diff --git a/pyc/templates/base.html b/pyc/templates/base.html
index 00dac18..370f8d7 100644
--- a/pyc/templates/base.html
+++ b/pyc/templates/base.html
@@ -11,6 +11,8 @@
{% block body %}{% endblock %}
</div>
<div id="nav">
+ {% load cache %}
+ {% cache 30 nav %}
<div class="nav">
<a href="{% url grader.views.index %}">Home</a>
@@ -23,6 +25,7 @@
<a href="{% url grader.views.faq %}">FAQ</a>
</div>
+ {% endcache %}
<div class="nav">
{% if authenticated %}
<a href="{% url django.contrib.auth.views.password_change %}">Change Password</a>