Cache follow button template snippet

This commit is contained in:
Mouse Reeve
2022-01-05 12:55:19 -08:00
parent a5309e9973
commit 6823d5f1b7
2 changed files with 20 additions and 0 deletions

View File

@ -1,4 +1,7 @@
{% load i18n %}
{% load cache %}
{% cache None follow_button request.user.id user.id %}
{% if request.user == user or not request.user.is_authenticated %}
{% elif user in request.user.blocks.all %}
{% include 'snippets/block_button.html' with blocks=True %}
@ -42,3 +45,4 @@
{% endif %}
</div>
{% endif %}
{% endcache %}