Cache follow button template snippet
This commit is contained in:
parent
a5309e9973
commit
6823d5f1b7
2 changed files with 20 additions and 0 deletions
|
@ -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 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue