Cache title author snippet

This commit is contained in:
Mouse Reeve
2022-01-05 14:33:10 -08:00
parent 4a43ad95ef
commit 0da0091237
3 changed files with 24 additions and 0 deletions

View File

@ -1,6 +1,8 @@
{% load i18n %}
{% load utilities %}
{% load cache %}
{% spaceless %}
{% cache None titleby book.id %}
{% if book.authors.exists %}
{% blocktrans trimmed with path=book.local_path title=book|book_title %}
@ -10,4 +12,6 @@
{% else %}
<a href="{{ book.local_path }}">{{ book|book_title }}</a>
{% endif %}
{% endcache %}
{% endspaceless %}