diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b65e3bf..2ed297f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,10 @@ Changelog ========= +next +---- +#. Add caching to detail template. + 0.1.6 ----- #. Do not show main image if images uploaded via CKEditor. diff --git a/post/templates/post/inclusion_tags/post_detail.html b/post/templates/post/inclusion_tags/post_detail.html index eebc95c..ef6ca86 100644 --- a/post/templates/post/inclusion_tags/post_detail.html +++ b/post/templates/post/inclusion_tags/post_detail.html @@ -1,12 +1,15 @@ {% extends "jmbo/inclusion_tags/modelbase_detail.html" %} +{% load cache %} {% block content %} - {% if ' - - - {% endif %} -
- {{ object.content|safe }} -
+ {% cache 3600 'object_detail_inclusion' object.id object.modified %} + {% if ' + + + {% endif %} +
+ {{ object.content|safe }} +
+ {% endcache %} {% endblock %}